If I have 3 differents items in my cart, each one with a quantity of 3, ngCart.totalItems() returns 3, not 9.
It seems wrong, if I'm on the products pages and I add the same item twice, ie I update the quantity of an item in my cart, in the summary I should see a difference in the number of items.
Currently I only see a difference in the total price, which seems not intuitive at all. See commerce websites like Amazon to see the right behaviour.
Different solutions:
refactor the ngCart.totalItems() function to take the quantity in account
add a parameter to ngCart.totalItems() to select if we want the number of unique items or the total number of items
I had build this intending totalItems() would return 'unique' items in your cart - but seeing how Amazon do this, that does make sense. I will conciser changing this.
If I have 3 differents items in my cart, each one with a quantity of 3, ngCart.totalItems() returns 3, not 9.
It seems wrong, if I'm on the products pages and I add the same item twice, ie I update the quantity of an item in my cart, in the summary I should see a difference in the number of items. Currently I only see a difference in the total price, which seems not intuitive at all. See commerce websites like Amazon to see the right behaviour.
Different solutions: