Adding products to the cart
Previously, we created this addToCart
method. Currently it just console logs a message, so in this video, we'll give it some proper functionality.
Updating total
The addToCart
method will need to do two things: firstly, it'll need to update the total
value, and secondly, it'll need to push products to the cart array so they're ready to be displayed.
Click to load comments...