Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
JavaScript Shopping Cart Tutorial
Rating: 4.7 out of 5(35 ratings)
186 students

JavaScript Shopping Cart Tutorial

Learn how to create a Shopping Cart with a Vanilla JavaScript
Created byTelmo Sampaio
Last updated 11/2021
English
English [Auto],

What you'll learn

  • Building a Shopping Cart
  • Build a Frontend Project
  • Using the Browser Local Storage
  • Using Modular Functions

Course content

1 section9 lectures2h 36m total length
  • Introduction3:13

    Build a vanilla javascript shopping cart by adding products, adjusting quantities, removing items, and calculating totals, while using local storage and modular functions for an e-commerce site.

  • Building the Frontend Interface13:54

    Build a vanilla JavaScript ecommerce shopping cart interface with product listings and add-to-cart on hover, using local storage to persist the cart across reloads.

  • Adding Numbers to the Cart18:53

    Learn to implement a dynamic shopping cart by wiring add-to-cart buttons to a loop, using localStorage to track item counts, and updating the cart badge on page load.

  • Adding Products to Local Storage19:40

    Push clicked products into the cart using local storage. Create and update a cart items object with product name, tag, price, and count, then stringify to JSON for storage.

  • Calculate Total Cost in Cart9:43

    Calculate the total cost by looping through cart products, retrieving prices, and updating local storage with the new total; handle first-time and subsequent clicks and convert strings to numbers.

  • Creating the Basket Page with All products27:03

    Build a cart page that displays products from local storage, shows quantity and total, and updates the view with JavaScript and CSS.

  • Removing Products from Cart Page24:14

    Learn to implement delete buttons on a shopping cart page by wiring click events to remove items, update local storage (card numbers, card items, total cost), and refresh cart display.

  • Increasing or Decreasing product quantity in Cart Page39:39

    Implement quantity controls in a vanilla JavaScript shopping cart, enabling increase and decrease actions, updating cart items in local storage, and refreshing the cart display.

  • Project Files0:02

Requirements

  • JavaScript Basics
  • JavaScript Objects
  • JavaScript Functions

Description

In this course you are going to learn how to create a Shopping Cart for an E commerce Website using JavaScript and the Local Storage.

IMPORTANT: This is a Front-End Project only, no Back-End is involved!

By taking this course you will learn the following skills:

LEARNING OUTCOMES

  • Creating a Shopping Cart using HTML, CSS & Vanilla JavaScript

  • Learn how to use the Browser Local storage

  • How to create Modular Functions

And don’t worry, I will cover everything at a very slow pace, and explain each step of the process, if you have any questions, post them down and we will be happy to help you :)

Who this course is for:

  • Mid Web Developers