App reviews, troubleshooting, and recommendations
Is it possible to add a variant to a cart (using cart ID?) through a custom app? Or does this have to be done with the AJAX api through the theme?
I'm trying to develop a middleware that receives webhooks when a cart is created, and automatically adds a warranty variant to the cart. There's a lot of conflicting information regarding what's possible on this. Thanks!
No. There is no backend api to communicate what's in a cart only frontend javascript pinging your app.
Use scripttags to add the item to the cart using the fronted ajax api
To create a custom order with specific items on the backend use draft orders.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025