Id of line_item in cart

Highlighted
Excursionist
37 0 7

In the Shopify documentation it's indicated that in the cart, the id of a line item is unique and generated for the cart: (https://help.shopify.com/themes/liquid/objects/line_item#line_item-id)

However the value of this id is the id of the variant, which sadly is not unique in the cart. If you use line item properties you can have the same variant in different line items so those different line items will have the same id.

Is this behavior the one wanted by Shopify?

Thanks,
Fouad

1 Like
Highlighted
New Member
1 0 0

I am also wondering here, because apparently if you remove one item, the other ones with the same id would also be removed, which is so frustrating

0 Likes