07
/Sep
Ajax Cart count Shopify
<span class="count">{{ cart.item_count }}</span>
jQuery(document).ready(function() {
jQuery("#addToCart").click(function() {
setTimeout(function() {
jQuery.getJSON('/cart.js', function(cart) {
console.log(cart);
jQuery("span.count").html(cart.item_count);
});
}, 200);
});
});
Post a Comment!