Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Same question here, seems like it's not fired when items are added to the cart.
What is the best way to listen to cart updates using ScriptTag?
Same here, it looks like everybody is hijacking the "fetch" function to intercept the calls, but Shopify should have an API to avoid that.
Seems to work for me.
Added this mainly for people who have searched for Shopify.onCartUpdate
Some debugging ideas:
If you're working with someone else's theme maybe insert your script before the theme's script but after the vendors file.
Maybe your theme isn't using the Shopify library to update the cart. Below is one way to check.
What are you even talking about?
When I assigned a function to Shopify.onCartUpdate, it had no effect after adding an item to the cart.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024