Add to cart from App Proxy

Highlighted
Shopify Partner
32 1 10

Hi there,

 

does anyone have experience with add to cart from the app proxy page?

 

Looking for help.

 

Thanks!

0 Likes
Highlighted
Shopify Expert
4117 27 378

The ability to add to cart is one the first Javascript hacks Tobi ever released for Shopify. You can find many calls to /cart or /update to handle that. Why would that involve an App Proxy? An App Proxy is meant for you to securely call your App to get some Liquid or JSON.

 

So the simple answer for you is this. If you can successfully use an App Proxy to make a call like /tool/feeblefuzz?12345 and you get back JSON like { "variant_id": 43211234582626, "quantity": 2 } you could easily run the standard Javascript call to update or add to cart that variant.

 

So first things first. Add to cart using your JS. Once you mastered that, do your Proxy callback, and when you get back a variant ID and quantity, push it to the cart. So two calls. One result. App Proxy to update cart.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes