Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Open the cart drawer and update items in a theme app extension

Open the cart drawer and update items in a theme app extension

Tomnaor
Shopify Partner
4 0 1

I have a theme app extension that allows users to add products to the cart via the AJAX API. How can I open the cart drawer with the updated cart items across all themes after successful AJAX call (I need a generic solution)? 

Reply 1 (1)

jam_chan
Shopify Partner
927 23 190

There is no generic solution. This is because the cart drawer is powered by different themes and apps. The only way is to integrate with the callback method of the cart drawer, e.g. trigger the cart drawer update after your app adds a product to the cart. Your best wish is the cart drawer can detect your Ajax API call automatically. But this is again not working most of the time.

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview