-
-
Save Sally165/d0565c177a47ed56bf9280a1fd7ff622 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- PAGEFLY CART HELPER - DO NOT DELETE --> | |
<script> | |
try { | |
setTimeout(function () { | |
window.__pagefly_helper_store__ && | |
window.__pagefly_helper_store__.subscribe(function (cart) { | |
$.get('/cart?view=json', function(data,status) { | |
console.log('check data', data) | |
/*optional stuff to do after success */ | |
$('.widget_shopping_cart_content').html(data); | |
}).always(function() { | |
var subtotal = parseFloat($('.widget_shopping_cart_body').data('subtotal')); | |
$(".nathan-cart-subtotal >span").html(elessiShopifyPre.formatMoney(subtotal, nathan_settings.moneyFormat)); | |
$(".cartCount").html($('.widget_shopping_cart_body').data('count')); | |
elessiShopify.favicon_counter(parseInt($('.widget_shopping_cart_body').data('count'))); | |
elessiShopify.nanoScroller(); | |
if (nathan_settings.show_multiple_currencies && elessiShopifyPre.StorageCurrency() !== null) { | |
Currency.convertAll(shopCurrency, elessiShopifyPre.StorageCurrency(), '.widget_shopping_cart_content span.money'); | |
Currency.convertAll(shopCurrency, elessiShopifyPre.StorageCurrency(), '.nathan-cart-subtotal span.money'); | |
} | |
if (parseInt($('.widget_shopping_cart_body').data('count')) > 0 ) { elessiShopify.initAddToCart(cart.image,cart.title);} | |
}); | |
}); | |
}, 2500); | |
} catch (e) { | |
console.warn(e); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment