Build a Shopify Ajax-cart without JavaScript coding
npm install liquid-ajax-cartdata-ajax-cart-section container
html
{% comment %} sections/my-cart.liquid {% endcomment %}
{% schema %} { "name": "My Cart" } {% endschema %}
`
##### 2. Include the section and the liquid-ajax-cart.js in your theme.liquid
`html
{% comment %}
Put this code within tag —
in a place where you want the ajax-cart section to appear
{% endcomment %}
{% section 'my-cart' %}
`
##### 3. Wrap Shopify product forms in the custom tag
`html
{% form 'product', product %}
{% endform %}
`
:tada: That's it!
Download the latest version of the liquid-ajax-cart.js from the documentation website.
The repository content
* docs folder — the documentation website;
* _src folder — the library sources;
* assets, config, layout, locales, sections, snippets, templates folders — the demo store theme sources. The password of the store — liquid-ajax-cart`.