Skip to content

Instantly share code, notes, and snippets.

@Sally165
Created April 24, 2023 02:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sally165/4ce3c3c0be10afe167b83e20f1144f94 to your computer and use it in GitHub Desktop.
Save Sally165/4ce3c3c0be10afe167b83e20f1144f94 to your computer and use it in GitHub Desktop.
<!-- PAGEFLY CART HELPER - DO NOT DELETE -->
<script>
try {
setTimeout(function () {
window.__pagefly_helper_store__ &&
window.__pagefly_helper_store__.subscribe(function (res) {
$.getJSON('/cart.json').then(cart => {
t.hideLoading();
t.showModalCart(".ajax-success-modal");
$('.ajax-success-modal.cart-popup-wrapper').addClass('open');
$(".ajax-success-modal").find(".ajax-product-image").attr("src", res.image);
$(".ajax-success-modal").find(".added-to-wishlist").hide();
$(".ajax-success-modal").find(".added-to-cart").show();
$(".ajax-success-modal").find(".ajax-product-title").text(res.product_title);
$(".ajax-success-modal").find(".ajax_price").html('');
$(".ajax-success-modal .total_itmes .popup-qty").text(res.quantity);
t.updateDropdownCart()
});
});
}, 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