Shopify themes, liquid, logos, and UX
I have tried many methods of calling cat/add.js. All respond with a 200 code but no items are actually added to the cart. The ID I use is a variant ID that is active and has stock. I have tried many variations of the JS code. All do the same thing.
I can also see the response in the console saying "Payload body and response have different number of items".
Here is the JS I use :
fetch('/cart/add.js', {
method: "post",
headers: {
"content-type": "application/json"
},
body: JSON.stringify({
items: [
{
quantity: 1,
id: 42575643115699,
properties: {
'flag': true
}
}
]
})
})
Payload:
items: [{quantity: 1, id: 42575643115699, properties: {flag: true}}]
Response:
{"items":[]}
Any Help Appreciated!
Please check the following URL for help
https://docs.rechargepayments.com/docs/add-an-item-to-the-cart-with-ajax-shop
Thanks!
Please check the following URL for help
https://docs.rechargepayments.com/docs/add-an-item-to-the-cart-with-ajax-shop
I have the same problem.
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