Skip to content

Instantly share code, notes, and snippets.

@Sally165
Created April 24, 2023 01:45
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/96aa890aad4db3e78406cf479ca06e5c to your computer and use it in GitHub Desktop.
Save Sally165/96aa890aad4db3e78406cf479ca06e5c 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 => {
document.dispatchEvent(new CustomEvent("product:added",{
bubbles: !0,
detail: {
variant: res.variant_id ,
quantity: 1
}
}));
});
});
}, 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