notrab / react-use-cart

React hook library for managing cart state
http://npm.im/react-use-cart
Apache License 2.0
367 stars 48 forks source link

Support price modifiers #40

Closed notrab closed 3 years ago

notrab commented 4 years ago

One of the ways this library has been extended in one project is by allowing price modifiers.

It would make sense to introduce new functions for addPriceModifier, updatePriceModifier and deleteModifier. Along with new functions to generate cart prices with and without modifiers.

Each modifier can essentially be another item that has id/name/description/quantity etc.