All Projects → carolineschnapp → Ajaxify Cart

carolineschnapp / Ajaxify Cart

Ajaxify Your Shopify Cart

Labels

Projects that are alternatives of or similar to Ajaxify Cart

Liquidswipe
Android LiquidSwipe Library
Stars: ✭ 721 (+915.49%)
Mutual labels:  liquid
Language Liquid
Liquid language support for Atom.
Stars: ✭ 28 (-60.56%)
Mutual labels:  liquid
Jekyll Assets
🎨 Asset pipelines for Jekyll.
Stars: ✭ 1,083 (+1425.35%)
Mutual labels:  liquid
Shopify Lang
Multi-Language Shopify Online Shop
Stars: ✭ 26 (-63.38%)
Mutual labels:  liquid
Timber
The ultimate Shopify theme framework, built by Shopify.
Stars: ✭ 911 (+1183.1%)
Mutual labels:  liquid
Jekyll Timeline
Timeline / Résumé Theme with Jekyll
Stars: ✭ 46 (-35.21%)
Mutual labels:  liquid
Liquidjs
A simple, expressive, safe and Shopify compatible template engine in pure JavaScript.
Stars: ✭ 638 (+798.59%)
Mutual labels:  liquid
Openshift Migration Best Practices
Best practices for migrating from OpenShift 3 to 4
Stars: ✭ 64 (-9.86%)
Mutual labels:  liquid
Jekyll Liquify
A Jekyll filter that parses Liquid from front matter
Stars: ✭ 21 (-70.42%)
Mutual labels:  liquid
Plankton
Open source simulator for maritime robotics researchers
Stars: ✭ 51 (-28.17%)
Mutual labels:  liquid
Condensation
A collection of handy extensions to the Liquid templating engine
Stars: ✭ 7 (-90.14%)
Mutual labels:  liquid
Liquid
Clojure Text Editor, for editing clojure code and markdown. Written entirely in Clojure with inspiration from Emacs and Vim.
Stars: ✭ 859 (+1109.86%)
Mutual labels:  liquid
Slater Theme
Shopify Starter theme based on slate
Stars: ✭ 47 (-33.8%)
Mutual labels:  liquid
Shopify Starter Theme
Shopify Starter Theme
Stars: ✭ 16 (-77.46%)
Mutual labels:  liquid
Shopify Naked
Completely naked Shopify theme to use as a starting point for theme development
Stars: ✭ 57 (-19.72%)
Mutual labels:  liquid
Cargo Generate
cargo, make me a project
Stars: ✭ 686 (+866.2%)
Mutual labels:  liquid
Jsx Lite
Write components once, run everywhere. Compiles to Vue, React, Solid, Angular, Svelte, and Liquid.
Stars: ✭ 1,015 (+1329.58%)
Mutual labels:  liquid
Solid
Liquid template engine in Elixir
Stars: ✭ 68 (-4.23%)
Mutual labels:  liquid
Gojekyll
A fast clone of the Jekyll blogging engine, in Go
Stars: ✭ 62 (-12.68%)
Mutual labels:  liquid
Liquid.net
.Net Port of the Liquid template language
Stars: ✭ 47 (-33.8%)
Mutual labels:  liquid

ajaxify-cart

Snippet to ajaxify Your Shopify Cart.

(Use this only if your theme does not already use Ajax, of course.)

The following themes have been confirmed to work with the 'ajaxify-cart' solution without any configuration:

  • Minimal
  • New Standard

How to install

Create a new snippet called ajaxify-cart. Paste in it the content of the ajaxify-cart.liquid file.

Then, include the ajaxify-cart snippet in your theme by pasting the code below in your theme.liquid file right above your </body> tag:

{% include 'ajaxify-cart' %}

How to configure (optional)

No configuration is necessary, but if you want or need to change a few things, go into your snippet and, at the bottom of it, change how the Shopify.AjaxifyCart.init() method is called, by passing to it a configuration object.

Things you can change:

  • addToCartBtnLabel

    Final label on add that cart button after the ajax request, so that you can add more. You could change that to 'Added to bag' for example. Default is Add to cart.

  • addedToCartBtnLabel

    Label on add to cart button that shows for howLongTillBtnReturnsToNormal milliseconds after item has been added to the cart. Default is Thank you!.

  • addingToCartBtnLabel

    Label on add to cart button while item is being added to the cart. Default is Adding....

  • soldOutBtnLabel

    Label on add to cart button when all of the item's stock is in the cart. Default is Sold Out.

  • howLongTillBtnReturnsToNormal

    Time during which the add to cart button label is addedToCartBtnLabel. Default is 2000. In milliseconds.

  • cartCountSelector

    CSS selector for the element on the page that contains the cart count to update after Ajax request.

  • cartTotalSelector

    CSS selector for the element on the page that contains the cart total to update after Ajax request.

  • feedbackPosition

    Where to position the feedback after the Ajax request. There are 3 possible values:

    • aboveForm for top of add to cart form,
    • belowForm for below the add to cart form, and
    • nextButton for next to add to cart button.

    The default is nextButton.

The configuration object can contain any of the above.

Example, if you wish to position the feedback above the add to cart form, and you wish to use 'Added to bag' as button label when the item has been added to the cart, use the following code:

Shopify.AjaxifyCart.init({ 
  feedbackPosition: 'aboveForm', 
  addedToCartBtnLabel: 'Added to bag' 
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].