devconcept / ng-shopping-cart

🛒 An Angular component library to create shopping carts
https://devconcept.github.io/ng-shopping-cart/
MIT License
45 stars 53 forks source link

Adding to quantity of item in cart #12

Closed shiavg closed 3 years ago

shiavg commented 3 years ago

Issue checklist

I'm submitting a...

Environment

Angular version: 9.1.12

NgShoppingCart version: 1.0.0

Platform: Windows 10

Node version: 12.4.0

Current behavior

If I add an item to the cart, then try to add a different quantity of the same item, the cart item's quantity is updated to the new quantity.

Expected behavior

I would like to add to the quantity, not update. eg I add an item to the cart. Then I add qty 2 of this item. I would expect to now have qty 3 in the cart. How is this possible?

Steps to reproduce

devconcept commented 3 years ago

You just have to update the quantity with the current value plus the amount you want to add