Shopify.onCartUpdate

follano
New Member
3 0 2
Does this function fire when a product is added to cart through ajax? 
 
Shopify.onCartUpdate = function(cart) {
  alert('There are now ' + cart.item_count + ' items in the cart.');
};
 
I tried using it multiple time when a user adds product to cart and nothing is happening?
xinghul
New Member
4 0 0

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?

0 Likes
manuelmontoya
Tourist
8 0 2

Same here, it looks like everybody is hijacking the "fetch" function to intercept the calls, but Shopify should have an API to avoid that.    

0 Likes