JavaScript Shopping Cart Tutorial for Beginners




In this video we will learn how to utilize JavaScript to add functionality to a shopping cart. We will cover how to check if the document is loaded, and how to query the document for elements by class, how to add events to elements. We will then combine all of these techniques to make the shopping cart in our web page work in an intuitive way.

Also, let me know if there are any other JavaScript topics you want me to cover in further depth.

Starting Code:
https://github.com/WebDevSimplified/Introduction-to-Web-Development/tree/master/Introduction%20to%20CSS/Lesson%203

Finished Code For:
https://github.com/WebDevSimplified/Introduction-to-Web-Development/tree/master/Introduction%20to%20JavaScript/Lesson%201

Make The Shopping Cart Accept Payments:

Band Website HTML Series:

Band Website CSS Series:

Twitter:

GitHub:
https://github.com/WebDevSimplified

CodePen:
https://codepen.io/WebDevSimplified

#Javascript #WebDevelopment #ShoppingCart

Original source


46 responses to “JavaScript Shopping Cart Tutorial for Beginners”

  1. Hey I downloaded the code like you advised and the html and the other files are different than the code you are using in your video. Would it be too much to ask that you upload the original code you used in the video?
    Sorry to be a pest.
    Thanks

  2. i'm having this error in my title innertext. Uncaught TypeError: Cannot read property 'innerText' of undefined
    at HTMLButtonElement.<anonymous>bag.js:46. please i need a way out this's waste two days of mine!

  3. Excellent work, sir. Your videos are very educational and helpful. However, if I may give you some unsolicited feedback: personally I would love to see you delve just a little bit deeper when first going over a new concept (loops, functions etc). By deeper I mean maybe spend say 1 to 2 minutes max explaining how it works and perhaps sharing a resource of where someone could learn more about them. I think that will be very beneficial for us newbies. Cheers.

  4. Web Dev Simplified indeed. Wasted 2 weeks learning add to cart feature from most viewed videos here in youtube but learned it for 45mins with this video. P.S. Can you please do some tutorials on php mysql with javascript. Thankyou and Godbless!

Leave a Reply