-
-
Save Sally165/a954a258ccb375b85fbcf00b988a9d7b 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 code - DO NOT DELETE - Added by Cristian --> | |
<script> | |
try { | |
setTimeout(function () { | |
window.__pagefly_helper_store__ && | |
window.__pagefly_helper_store__.subscribe(function (res) { | |
$.getJSON('/cart.json').then(cart => { | |
let t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]; | |
try { | |
const {Cart: i} = MinimogTheme; | |
MinimogEvents.emit("ON_ITEM_ADDED", e), | |
i && (await i.refreshCart(), | |
t && (await i.renderNewCart(), | |
i.openCartDrawer(), | |
MinimogTheme.Notification.show({ | |
target: i.domNodes?.cartDrawerItems, | |
method: "prepend", | |
type: "success", | |
message: MinimogStrings.itemAdded, | |
delay: 400 | |
})), | |
await Shopify.onCartUpdate(i.cart, !1)) | |
} catch (e) {} | |
}); | |
}); | |
}, 2500); | |
} catch (e) { | |
console.warn(e); | |
} | |
</script> | |
<!--- End of Code → |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment