Local storage shopping cart. | Insert, update, remove products from the browser's local storage.

Опубликовано: 20 Март 2022
на канале: Digital Fox
28,773
453

In this video we are going to see basic shopping cart actions, like storing, updating, and removing products from the browser's local storage, with javascript and the localStorage object.

We are gonna work with higher order functions to make our life easier, such as:
the filter() function.
the find() function.
and the map(), and reduce() functions.

If you are more a reader, you can check out the article on my website,
where you will find also the source code from this tutorial.
https://digitalfox-tutorials.com/tuto...

If you find my content helpful, you can subscribe and
get notified every time i upload a new video. Thank you.

Hey guys i spotted an error.
In the updateQuantity function and inside the if statement please add the following line of code.
product.price = product.price * quantity;

This way the getTotal function will get the correct total price.
Sorry guys.

If you feel like saying thanks, you can buy me a coffee.
https://www.buymeacoffee.com/digitalfoxb


Смотрите видео Local storage shopping cart. | Insert, update, remove products from the browser's local storage. онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Digital Fox 20 Март 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 28,773 раз и оно понравилось 453 людям.