node-react-ecommerce icon indicating copy to clipboard operation
node-react-ecommerce copied to clipboard

Quantity concatenates instead of adding

Open Blaise-Telfer opened this issue 5 years ago • 0 comments

Untitled If you have more than one item in the cart and you change the quantity, the "subtotal _ items" will concatenate the values instead of adding them. I.e, if you have qty of 1, 2, and 1, it will now appear as "subtotal 121 items", and it continues concatenating even if they're all returned to a qty value of 1. This is because the "qty" value is an integer, but is programmed to become a string if changed to any number greater than 1. You can see this on the console in my screenshot.

Blaise-Telfer avatar Dec 02 '20 21:12 Blaise-Telfer