Js Buy SDK - add product to checkout

13 1 2

Hi fellow Shopifiers and Admins

The question I have is about adding a product to a checkout created with the Buy Sdk for Javascript.

I've noticed that the ID of the product in the checkout is different than the one before adding the product to the checkout.

Has anyone else experienced this and if so, is this normal behaviour?

I am adding a product to the checkout and may want to remove it later based on certain conditions, ie remove a delivery fee if the subtotal price is more than a certain threshold.

Is there a way to preserve the id when adding a product to checkout?

I am currently going through the lineItem array and checking against a custom attribute to identify the delivery fee in the checkout.