tastyigniter / ti-ext-cart

A TastyIgniter extension that allows you to easily add a shopping cart to your site.
MIT License
8 stars 32 forks source link

parseFloat() minQuantity Value to prevent string concatenation #87

Closed CupNoodles closed 10 months ago

CupNoodles commented 10 months ago

I believe this only comes up if you're using a custom menu template and/or an extension like https://github.com/CupNoodles/ti-ext-pricebyweight.

However, JS + defaults to string concatenation if you pass it a decimal value like '1.00' or '.25' therefore as it stands, hitting the + button when the minQuantity or step field is set to '1.00' causes it to go from 1 to 11 to 111, etc.

sampoyigi commented 10 months ago

Thank you!