Liquid, JavaScript, themes, sales channels
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.
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024