If the shop uses ajax carts add the following script on the theme.liquid template.
<script type="text/javascript">
(function() {
// Replace the following variable
var cartID= "cart"
// Loop throught the items in the cart
// and push their properties into the purchases object
ShoeSizeShoppingCart.purchases.push({
"shoeID": "SHOE_ID",
"size": "SIZE",
"scale": "SCALE", // downscale
"quantity": "QUANTITY",
"price": "PRICE"
});
// Do not modify
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://shoesize.me/plugin/cart.js?shopid=' + encodeURIComponent(ShoeSizeShoppingCart.shopID) +'&sid=' + Math.round(new Date().getTime() / 1000);
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script);
var cart_target = document.getElementById(cartID);
var cart_params = {childList: true,subtree: true,characterData: true}
var cart_observer = new MutationObserver(function(mutations) {
cart_observer.disconnect();
if(typeof ssm_setCart == "function"){
ssm_trackCart();
cart_observer.observe(cart_target,cart_params);
}
});
cart_observer.observe(cart_target,cart_params);
})();
</script>
Update your browser to view this website correctly. Update my browser now