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.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025