Because the cart items can be stored in local storage, entries may have a longer lifetime that the products & attribute that are in memory. Thus, cart items stores an ID for the product & attributes that may change between page reloads, breaking the references.
This issue can be solved by relying on a constant & manually defined uid field instead of the data-source autogeneratedid field. It should be added in the ICartItem interface & the cart item attributes definition object.
Because the cart items can be stored in local storage, entries may have a longer lifetime that the products & attribute that are in memory. Thus, cart items stores an ID for the product & attributes that may change between page reloads, breaking the references.
This issue can be solved by relying on a constant & manually defined
uid
field instead of the data-source autogeneratedid
field. It should be added in theICartItem
interface & the cart item attributes definition object.