Does AJAX /cart/add.js use Shopify Scripts?

New Member
2 0 1

Does Shopify's AJAX /cart/add.js method automatically communicate with the Shopify Scripts API and run any line item scripts on the items added to the cart via the AJAX method?

Replies 2 (2)
New Member
2 0 1

anyone have an answer yet? I need to know this as well.


Shopify Expert
727 49 197

Yes. Any time the cart is modified, the Script will run and when you fetch the cart afterward, you'll get the cart with the discounts applied.