d
Topic
Posts:
8
10 days ago

How to use Shopify api.js with registered script via script tag?

Hello All,

I am creating one App. I have registered one script via script tag for frontend activities.

Now i have flow like when user add items to cart i want to know about that product added cart. Even when item removed,updated i want to know this activity so i can do my some stuff.

I did search and found about api.js.

https://ecommerce.shopify.com/c/ecommerce-design/t/api-js-documentation-29769

But i don't know how to use it.

Is this api.js i already added by shopify or not?

If already loaded then how to access events like onItemAdded, onItemAdded in registered scripts?

If not loaded by shopify then how to load this js and use it's functions?

Please help me. i could not found any related detailed information.