Custom Cart/product API issues

New Member
1 0 0

I have developed a custom feature for many stores that adds some item properties to a product on the fly through the JS add to cart API.


The problem is that when adding the same item but with different values for those properties it overrides the previous cart item.
I would say it also happens when adding the exact same thing twice, as it keeps it but with quantity 1 instead of 2.


I guess that the system identifies it just with the variant ID, and doesn't care about its properties.
My question is, is there a way I missed on how to make it not override the item?


Maybe there is some option to make it use the properties as identifiers as well, or some other way to generate my own unique cart item ID.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
240 33 37

Hey @Qs,

 

They should be behaving as different items in the cart. Can you provide a sample of the code you're using, or a link to a demo?

0 Likes