[Solved] Whats the best way to get the total from the cart? [closed]
[ad_1] Your attempt is close, but doesn’t work because your price and amount values are strings (that is, they’re encased in quotes). Now, if you had instantiated your total variable to 0, the code would then realize you want price and amount to be added as a number, and work as you expect: var cart … Read more