Possible to access the Shopify Ajax API or read/update the cart from an app embed block?

Chad_Johnson
Shopify Partner
33 1 17

I am being told by Shopify that my app may no longer use a ScriptTag and must convert to using an app embed block. My upselling app makes heavy use of the Shopify Ajax API in order to read cart data and replace items in the cart (i.e., when an upsell occurs).

 

Is it even possible to use the Shopify Ajax API from an app embed block? Or, is there another way to update the customer's cart from within an app embed block?

 

My understanding is that these run in a sandboxed web worker environment, similar to how post-checkout extensions work.

 

This new requirement introduced by Shopify is going to completely cripple my app and destroy two years of hard work and significant financial investment...

Reply 1 (1)

Chad_Johnson
Shopify Partner
33 1 17

Nevermind! I made a bad assumption that app embed blocks run in a sandboxed web worker environment, and this appears to not be the case.