Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Slate | 1,287 | 24 | 13 | 2 years ago | 29 | November 22, 2018 | 191 | mit | JavaScript | |
Slate is a toolkit for developing Shopify themes. It's designed to assist your workflow and speed up the process of developing, testing, and deploying themes. | ||||||||||
Themekit | 983 | 3 months ago | 58 | June 23, 2021 | 93 | mit | Go | |||
Shopify theme development command line tool. | ||||||||||
Timber | 923 | 3 | 5 years ago | August 25, 2016 | 50 | mit | Liquid | |||
The ultimate Shopify theme framework, built by Shopify. | ||||||||||
Awesome Shopify | 634 | a year ago | cc0-1.0 | |||||||
📌✨A curated list of awesome Shopify resources, libraries and open source projects. | ||||||||||
Shopify Theme Lab | 519 | a year ago | 2 | mit | JavaScript | |||||
Shopify theme development environment using Liquid, Vue and Tailwind CSS. Built on top of Shopify CLI 🧪 | ||||||||||
Theme Scripts | 462 | 19 | 6 | 2 months ago | 17 | March 15, 2021 | 66 | mit | JavaScript | |
Theme Scripts is a collection of utility libraries which help theme developers with problems unique to Shopify Themes. | ||||||||||
Starter Theme | 456 | a month ago | 56 | mit | Liquid | |||||
The Shopify Themes Team opinionated starting point for new a Slate project | ||||||||||
Cartjs | 437 | 5 | 2 years ago | 27 | November 14, 2020 | 44 | mit | CoffeeScript | ||
A Javascript library to power cart management for Shopify themes. | ||||||||||
Slater | 348 | 1 | 3 | a year ago | 49 | April 14, 2020 | 62 | Liquid | ||
🛠 Shopify development toolkit | ||||||||||
Theme Check | 304 | 1 | 11 days ago | 49 | December 12, 2022 | 89 | other | Ruby | ||
The Ultimate Shopify Theme Linter |
Cart.js is a Javascript library that makes it easy to add dynamic cart features to Shopify themes.
It abstracts away the difficult parts of working with Shopify's AJAX API and provides a simple, consistent interface to manipulating a customer's cart. Without having to worry about the quirks in Shopify's endpoints or about making all of your requests synchronous, you can just write code like this:
function example() {
// Clear the existing cart.
CartJS.clear();
// Add 3x "12345678" items, with a custom "size" property of "XL".
CartJS.addItem(12345678, 3, {
"size": "XL"
});
// Add multiple items in a single call.
CartJS.addItems([
{
id: 12345678,
quantity: 3,
properties: {
"size": "XL"
}
},
{
id: 87654321,
quantity: 2
}
]);
// Set a custom cart note.
CartJS.setNote('This is a custom cart note.');
}
Neat, huh? But that's just the beginning.
Cart.js bundles two powerful optional modules that make it even easier to build dynamic carts into your themes:
Lets you use simple data-*
markup attributes to hook in to Cart.js methods,
without having to write any Javascript yourself.
For example, to create a button that added a particular product to your cart, all that's required is:
<button data-cart-add="12345678">Add Product</button>
In combination with Rivets.js, the DOM Binding module lets you write HTML
templates in your .liquid
files that are re-rendered dynamically when the
contents of your cart change, like this:
<div data-cart-view>
You currently have {cart.item_count} item(s) in your cart, for a total of {cart.total_price | money_with_currency}.
</div>
Documentation and examples are available on the home page.
You can check out a list of who's using Cart.js in production on the Built with Cart.js page.
Cart.js currently depends on jQuery for its AJAX helpers, custom event bindings and utility methods. This usually isn't a problem as most Shopify themes ship with jQuery.
Rivets.js is required if you want to use the DOM Binding module. The
distribution of Cart.js includes a minified asset (rivets-cart.min.js
) which
contains both the Cart.js library and a bundled version of Rivets.js.
Refer to the change log for a full list of changes.
Contributions are very much welcome! Read our contribution guidelines for details on submitting pull requests that will be accepted.
Gavin Ballard is the founder, CEO, and occasional developer at Disco Labs, a Shopify Plus partner agency specialising in solutions for merchants with complex needs.
Thanks to the following people who have contributed their time and code to Cart.js!