Azkali / e-make

MIT License
0 stars 0 forks source link

Shop/Cart: Keep consistency of products & attributes in cart items #2

Closed GerkinDev closed 5 years ago

GerkinDev commented 5 years ago

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 autogenerated id field. It should be added in the ICartItem interface & the cart item attributes definition object.

Azkali commented 5 years ago

Seems OK; moving to Reviewer approved