I am looking for a workaround to come up with a unique and static identifier for the cart line item.
Using variantId is not an option because there might be several line items with the same variantId.
Using lineitem key would be an option but it gets updated when lineitem properties are changed, Also keys of all line items are getting updated when quantity for a single lineitem is changed for a large amount, for example from 1 to 50.
The problem with “line” i.e. index of line items is that in my cart user can add and remove warranties for each line item, and each warranty is a separate product i.e. line item so while adding or removing warranties the line property also gets changed.
If anyone has any possible solution in mind please share it