
Start with a starter front-end project for vanilla cart js, with no back end and product data lives in html (index.html), ready to edit prices and images.
Enable strict mode to catch errors, then listen for clicks on cart buttons using data attributes, querySelector and arrow functions to collect product image, name, and price.
Learn how to add products to a shopping cart with VanillaCartJS, render items using template strings and insertAdjacentHTML, manage a cart array, and prevent duplicates.
Learn to implement quantity controls in a vanilla ES6 shopping cart: set initial quantity to 1 and wire increase, decrease, and remove buttons with DOM event listeners.
Master managing a vanilla cart by decreasing quantities and removing items with safe checks, DOM updates, and CSS animations, including preventing below-one quantities and persisting cart state in local storage.
Save the cart to local storage by stringifying the cart array with JSON.stringify under a key, then load it with JSON.parse on startup and update on changes.
Refactor the vanilla cart code by extracting repeated blocks into new functions, passing product and cart button elements to improve readability and enable future PayPal checkout and clear cart features.
Add a clear cart action and a single cart footer, update the cart array and local storage on item removal, and prepare a PayPal checkout flow.
Display the cart total on the PayPal checkout button and build a PayPal form to pass items, amounts, and quantities for checkout.
If you ever wanted to build a simple but powerful shopping cart with JavaScript this course is definitely for you.
This course it's not about creating ultra king size e-commerce solution. It's about creating real world project with business ready attitude.
All products in this project come directly from HTML code. There's no database or any back-end code. If you want to add new product just copy-paste piece of HTML code.
You will create a project with following features:
Writing code meant to be exciting and I hope it will be like that in this course. As a matter of fact the shopping cart project is just a cover. The real deal is with this course you should learn programming in JavaScript using ES6 features.
It's worth mentioning that every lecture has it's own source code files. So if you will somehow stuck you can always compare your code with code from particular lecture.