Create a Shopping Cart With Vanilla JavaScript | ES6

  Рет қаралды 81,083

Code Explained

Code Explained

Күн бұрын

Пікірлер: 150
@CodeExplained
@CodeExplained 3 ай бұрын
🚨 Big Announcement! 🚨 Hey everyone! I've made a big decision for this channel-I've turned off ads on all my videos! That's right, you can now enjoy all my content ad-free! This means I'm earning $0 from ad revenue, but I believe this is the right move to make your viewing experience better. If you find my content valuable and want to support my work, there are several ways you can help: Like & Share: Simply liking the video and sharing it with friends helps a lot! Subscribe & Hit the Bell: Stay updated and never miss a new video. KZbin Thanks: Use the "Thanks" button below to send a one-time donation. Join the Channel Community: Get exclusive perks and behind-the-scenes content. Buy Me a Coffee: buymeacoffee.com/CodeExplained PayPal Donation: www.paypal.com/paypalme/CodeExplained Every little bit counts and goes directly to creating more high-quality content for you all. Thank you so much for your continued support! Let’s keep growing and learning together! 🌟
@solomonjackson7984
@solomonjackson7984 2 жыл бұрын
Best vanilla JavaScript tutorial ever, With a good and clear English, thank you sir.
@ifeomablessing9578
@ifeomablessing9578 Жыл бұрын
💯 accurate. However I need help. When I host my project on git, the images in the array are not displaying. I need help please
@rfryanfavour4369
@rfryanfavour4369 2 жыл бұрын
Lol tbh firstly you just did a lot for me as a freelancer I appreciate that big time... and you used all easy syntaxes in such a unique way... you sir deserve an award I appreciate you... thank you
@bensonbenson4149
@bensonbenson4149 11 ай бұрын
i had to pause the video at minute 23 to drop this comment because just few minutes in and i am understanding so many concepts i didnt understand before. great job brother
@maxmaksum4673
@maxmaksum4673 2 жыл бұрын
Men you are so clear, simple, logical in explaining this stuff. Thank you
@rfryanfavour4369
@rfryanfavour4369 2 жыл бұрын
THIS is the best tutorial I've ever watched in my life
@Sky-yy
@Sky-yy 3 жыл бұрын
Thanks for explaining so deeply. You're doing just outstanding job, by just not typing and telling what to do just like other tutors do, even Brad traversy does that which is not good, you're explaining the line by line code and implement.
@CodeExplained
@CodeExplained 3 жыл бұрын
Yeah I always try my best to explain the logic behind ... thanks a lot for your comment.
@Sky-yy
@Sky-yy 3 жыл бұрын
@@CodeExplained this needs to be recognized coz even the paid udemy courses does that thing of coding and telling what they are doing. It should be like "what, how, why" should be answered and thats how a beginner's mind would understand how to approach logically.
@CodeExplained
@CodeExplained 3 жыл бұрын
Yeah you're right, beginners need to understand everything so they can write their own code by themselves, or they will just copy others code all the time and that will take so much time for them to learn things they can learn in a very short time ... well thanks again for your comment
@Sky-yy
@Sky-yy 3 жыл бұрын
@@CodeExplained I have landed my first job as software engineer it's been 2 months and I struggled alot. Coz I wasn't able to write code on my known coz I followed tutorials which used to teach like"typing code and tell what they were doing even in paid " no hows, where, why. I hope you create more such content, it would really add real value to people's lives. MERN project series would be awesome if you start with that.
@alinabianca3934
@alinabianca3934 11 ай бұрын
Thank you so much for this!!An extraordinary teacher! Easy code and explained very well
@ummasiyah3238
@ummasiyah3238 3 жыл бұрын
Thank you so much for the clear explanation. This is by far the best shopping cart tutorial I have come across.
@CodeExplained
@CodeExplained 2 жыл бұрын
Wow, thank you!
@biancas9110
@biancas9110 3 ай бұрын
Thank you so much for such a detailed and helpful tutorial!! Keep up the good work
@CodeExplained
@CodeExplained 3 ай бұрын
Thank you! Will do!
@elieli2570
@elieli2570 2 жыл бұрын
Extremely useful tutorial as usual, many thanks for bringing this to us!
@bogopurvi
@bogopurvi 2 жыл бұрын
This is the very best video I found that truly helped me. It was easy to follow and straight-to-the-point. Keep up the good work! Thank you!
@stevenfranz5462
@stevenfranz5462 2 жыл бұрын
Thank you so much for this tutorial! This explanation is the best on KZbin.
@vt9988
@vt9988 2 жыл бұрын
this tutorial is the best I could find on youtube :) Please contiunue doing amazing tutorials :D
@CodeExplained
@CodeExplained 2 жыл бұрын
Oh thanks a lot buddy, happy to hear that 😊
@CAFernandezB
@CAFernandezB 2 жыл бұрын
Please do More vanilla projects!! You're amazing Bro! Saludos desde Venezuela, tus vídeos son los mejores.. soy un fiel seguidor, extrañaba tus vídeos, espero ver muy buen material de proyectos de la vida real, que nos abren la mente, nuevamente gracias.. tu contenido, y la forma en la que explicas, es de lo mejor que he visto.
@marymaundu1702
@marymaundu1702 11 ай бұрын
This is really so well explained. I learnt a lot, Thank you.
@EnumahPearl
@EnumahPearl 9 ай бұрын
A great teacher❤
@negin3408
@negin3408 Жыл бұрын
This is the best video i found that truly helped me 🌟thank you
@SandeshMotoVlogs
@SandeshMotoVlogs 3 жыл бұрын
I have only 1 word for u : GOAT 🐐 ( Greatest Of All Time)
@CodeExplained
@CodeExplained 3 жыл бұрын
hahah thanks a lot ❤️
@revayuap972
@revayuap972 2 жыл бұрын
This guy is a legend very straight forward tnx so much man
@AjayKumar-id7mb
@AjayKumar-id7mb 3 жыл бұрын
Thanks Bro you are doing a great work Your way of teaching is really simple Loved that
@CodeExplained
@CodeExplained 2 жыл бұрын
So nice of you
@lokeshkhati8413
@lokeshkhati8413 3 жыл бұрын
I've been eagerly waiting for your video❤️
@CodeExplained
@CodeExplained 3 жыл бұрын
Happy to hear that ❤️
@dindindongi
@dindindongi 3 жыл бұрын
I am beyond thankful for your detailed explanation, it helped me alot to understand the basic concept and implementation🙏
@CodeExplained
@CodeExplained 2 жыл бұрын
Glad it was helpful!
@ckolobok57
@ckolobok57 2 жыл бұрын
You Rock! It's the best guide I've ever seen. Thank you so much.
@CodeExplained
@CodeExplained 2 жыл бұрын
Wow, thanks!
@teyuu
@teyuu 2 жыл бұрын
Thank you so much for this video. It really helped to do some homework I had and to understand very easy some concepts of JavaScript. Great teacher, congrats!
@dansmar_2414
@dansmar_2414 2 жыл бұрын
This is the best shopping cart tutorial!!! Thank you so much
@CodeExplained
@CodeExplained 2 жыл бұрын
You are so welcome!
@shahhussain5563
@shahhussain5563 Жыл бұрын
very clear and crisp explanation. Thanks a millions ❤
@T_Midnight_Sun
@T_Midnight_Sun 3 ай бұрын
Guyyyy you’re the best ❤
@ashrafulmomenshuvo5344
@ashrafulmomenshuvo5344 Жыл бұрын
Awesome !!! so easy method to create Shopping Cart ...!!!
@thientinhlamhuynh3004
@thientinhlamhuynh3004 2 жыл бұрын
Wow! Good job bro, keep going.
@CodeExplained
@CodeExplained 2 жыл бұрын
Thank you, I will
@amanpratap5547
@amanpratap5547 2 жыл бұрын
Extremly Extremly Extremly..........................useful. Thanks for the content.
@CodeExplained
@CodeExplained 2 жыл бұрын
Glad it was helpful!
@mmonir2061
@mmonir2061 Жыл бұрын
Such a wonderful video! nicely explained. Really appreciate. Waiting for new videos.
@gopalakrishnachinta3769
@gopalakrishnachinta3769 3 жыл бұрын
Thank you so much sir for this valuable tutorial and 'easy to understand' explanation.
@CodeExplained
@CodeExplained 2 жыл бұрын
Thanks and welcome
@ambareen2368
@ambareen2368 3 жыл бұрын
Please do more vanilla JS projects! 🙏 these are soooo helpful
@CodeExplained
@CodeExplained 3 жыл бұрын
I will 👍
@dtawantawng5131
@dtawantawng5131 2 жыл бұрын
This is fantastic! Thank you for the great content! 👏
@irwankaryantotandek6058
@irwankaryantotandek6058 2 жыл бұрын
Love ur channel. Please do more vanilla javascript projects with fetch and more.. Subscribed!
@howtodo9412
@howtodo9412 3 жыл бұрын
That's Great! I have been Helpful from this video, I am beginner in javascript.
@CodeExplained
@CodeExplained 2 жыл бұрын
Great to hear!
@CodeWithOgochukwu
@CodeWithOgochukwu 5 ай бұрын
Wow! Thanks for this
@CodeExplained
@CodeExplained 4 ай бұрын
You're welcome
@march9698
@march9698 3 жыл бұрын
Could you possibly make another video on this project, but this time on how to make it responsive? It seems like an awesome project on the JS side, but there is a lot of overflowing when you shrink the screen.
@CodeExplained
@CodeExplained 3 жыл бұрын
Yeah I know, I didn't want to waste time on making it responsive, sorry.
@march9698
@march9698 3 жыл бұрын
@@CodeExplained No need to be sorry, you did an amazing job.
@frontendwithsalimi
@frontendwithsalimi 2 жыл бұрын
Thank you for this beautiful tutorial. Your explanation is really easy to understand and I learned a lot
@andrisalazar7565
@andrisalazar7565 2 жыл бұрын
THanks a Lot for all this information!!! very well explained
@Kevin-uf7yt
@Kevin-uf7yt 2 жыл бұрын
if i use json to store my data, what is the equivalent code of the function addToCart in 16:39 for it?
@someChicoRy
@someChicoRy Жыл бұрын
thank you for your hard work. it was very informative and useful🙂
@renesalvacion2452
@renesalvacion2452 2 жыл бұрын
Its working if you have one array of object only, but if you create multiple array of object the quantity in add to cart will have a behaviour of twice amount of quantities on every button of quantity that you click in add to cart in every object inside the array of object
@jahjahtruth
@jahjahtruth 3 жыл бұрын
Nice tutorial! added an alert for if the user tries to add quantity that is not available instock. Now just wondering how to dynamically change the instock value after a purchase.
@GuitarHope
@GuitarHope Жыл бұрын
I haven't tried it yet but I think I'd create an update function for the instock value (based on the product id) which would be called after every purchase.
@sarvij9870
@sarvij9870 2 жыл бұрын
Hi, best shopping cart tutorial, ty Sir. I have a question: min 38:50, instead of showing the price, i got NaN. Any solutions?
@nikolabozic9791
@nikolabozic9791 13 күн бұрын
Hello Code Explained, i have a question. For example, if i want to make an individual page for each of these products, can i use the same data from products array to make individual page for each product? And if i can, which of array methods should be used? Thanks in advance!
@universalworthy2169
@universalworthy2169 2 жыл бұрын
Wonderful live saver tutorial. Please do more vanilla js projects, like pagination, dictionary...
@CodeExplained
@CodeExplained 2 жыл бұрын
Happy to hear it was helpful, yes I will.
@mackinlay27
@mackinlay27 Жыл бұрын
What a great tutorial! thank you.
@codewithharris
@codewithharris Жыл бұрын
Please when are you gonna add filter cards JavaScript tutorial. I have search every where but doesn't implement it without error
@charlesohlson4316
@charlesohlson4316 2 жыл бұрын
I have a project coming up to get a online degree while most of everyone knows abouts...... this is huge help. Yup I'm aboard send all info brother.
@ifeomablessing9578
@ifeomablessing9578 Жыл бұрын
Awesome. However I need help. When I host my project on github, the images in the array are not displaying. I need help please
@yogapassion
@yogapassion 3 жыл бұрын
I have been waiting more videos from you for a long time . Do you alright ?
@plaguegames3556
@plaguegames3556 2 жыл бұрын
Great explanation
@CodeExplained
@CodeExplained 2 жыл бұрын
Glad you think so!
@Ojr_trading_style
@Ojr_trading_style 2 жыл бұрын
Very nice... i like this video
@sahedsumon8511
@sahedsumon8511 3 жыл бұрын
It's a really great explanation.
@CodeExplained
@CodeExplained 2 жыл бұрын
Glad you think so!
@fishmarkholmes1834
@fishmarkholmes1834 3 жыл бұрын
I love your video so much , thank you 🙏🏻
@CodeExplained
@CodeExplained 3 жыл бұрын
Happy to hear that, thanks ❤️
@GabrielSilva-yk6kk
@GabrielSilva-yk6kk 2 жыл бұрын
thanks for sharing your knowledge
@CodeExplained
@CodeExplained 2 жыл бұрын
Glad to do so.
@vijayd5551
@vijayd5551 2 жыл бұрын
lots of thanks... please share the next part for checkout cart.
@CodeExplained
@CodeExplained 2 жыл бұрын
Next part? What do you want for next part?
@aboodibajaman9975
@aboodibajaman9975 3 жыл бұрын
hi but how can i add a form with the cart like i want the user to enter his name, number etc with the cart and that to be submitted with products in the cart. i want to get the data of the cart and the form
@mohanadgallab
@mohanadgallab 11 ай бұрын
thank you alot for this ,,
@ДмитрийТравин-ц4д
@ДмитрийТравин-ц4д 3 жыл бұрын
I wish you 1m subscribers!
@CodeExplained
@CodeExplained 3 жыл бұрын
Thanks a lot ❤️
@alexanderson1193
@alexanderson1193 2 жыл бұрын
if I want to make a separate single product page what do I need to alter?
@eliasgrinwisplaatstultjes7857
@eliasgrinwisplaatstultjes7857 2 жыл бұрын
Is there a way to use the shopping cart on another html page? so that the shopping cart is not on the right? Because when i try that my cart doesn't render
@ifeomablessing9578
@ifeomablessing9578 Жыл бұрын
Exactly!!!! I need help with this too.?
@nataliabogach6580
@nataliabogach6580 2 жыл бұрын
How can you add product options like size and color ?
@krzysiekwarchal
@krzysiekwarchal 3 жыл бұрын
Great Job. Is there a way to send the shopping bag to email when clicking proceed to checkout?
@_myenglishbro
@_myenglishbro 2 жыл бұрын
Amazing tutorial
@codingislife6387
@codingislife6387 2 жыл бұрын
Nice Sir. Please Make More Project ... Please Please
@CodeExplained
@CodeExplained 2 жыл бұрын
Thanks, of course I will
@codingislife6387
@codingislife6387 2 жыл бұрын
Thank Sir.
@fatimakayy
@fatimakayy 2 жыл бұрын
Very helpful tutorial. Could you please tell me what to do if instead of stopping the user from reducing quantity below zero, I can simply remove that product from the cart when they get to zero?
@CodeExplained
@CodeExplained 2 жыл бұрын
We have created a function "changeNumberOfUnits" we use the map method to change the array cart items number of units. I think you'll need to use a forEach method, and play with the "if statement" so when the numberOfUnits === 1 and the user clicks on "minus" => call the function "removeItemFromCart" If you still need help just ask.
@fatimakayy
@fatimakayy 2 жыл бұрын
@@CodeExplained thank you! I figured it out
@darkNovaskar
@darkNovaskar Жыл бұрын
If I download it as a zip file then complete it and push it to my git hub will it show you as the contributor?
@feliciatimmy9467
@feliciatimmy9467 3 жыл бұрын
you're a life saver bro
@CodeExplained
@CodeExplained 3 жыл бұрын
Happy to hear that, thanks ❤️
@aza7866
@aza7866 2 жыл бұрын
Nice video, but onclick event is a bit outdated, I tried to use eventlistener as an alternative somehow but didnt manage it (Im only in my first year computer science) :(
@lovemanga_forever
@lovemanga_forever 3 жыл бұрын
I see your video of react and know how to use useContext, useEffect in real life. Could you make a project in React that use other hooks like useReducer useCallback useMemo so I can break down and analysis how and when to use them. Thank you 👍
@CodeExplained
@CodeExplained 2 жыл бұрын
I'll check it out!
@Mindinmatrix
@Mindinmatrix 2 жыл бұрын
How would keep the number of items to be display on other pages. Im asking that because i want the number of items in cart to be in the nav bar on all my pages. The user can then click on the cart to go to cart. let me know, thank you :D love your videos.
@CodeExplained
@CodeExplained 2 жыл бұрын
Save the cart to the user's browser's local storage.
@Mindinmatrix
@Mindinmatrix 2 жыл бұрын
@@CodeExplained Thank you! I had already figured it out. I also manage to make orders and render orders to the user's profile page and much more! Your video propelled me in the right direction! Thanks again!
@charlesmwaniki1868
@charlesmwaniki1868 2 жыл бұрын
perfect....thanks man
@CodeExplained
@CodeExplained 2 жыл бұрын
You're welcome!
@callumspellium1516
@callumspellium1516 3 жыл бұрын
weres the chocolate and banna javscript?
@CodeExplained
@CodeExplained 3 жыл бұрын
Coming Soon! Vanilla JS means Plain JS no framework.
@andrewsokolovsky9127
@andrewsokolovsky9127 2 жыл бұрын
I do not understand why this forEach of renderCartItems adding same element second time. Loop is going to another element of an array, so why previous is here too? Could you explain it more to me? ps.thanks a lot for this video man!:)
@lidijajezova2025
@lidijajezova2025 2 жыл бұрын
"Here" it is where?
@sivas4061
@sivas4061 3 жыл бұрын
What vs code theme you're using?
@essenc3189
@essenc3189 Жыл бұрын
veryy good tutorial , 10x
@rabiekhalifa1103
@rabiekhalifa1103 Жыл бұрын
Thank you a lot 💖
@expukpuk
@expukpuk 3 жыл бұрын
Where is the link for your template in github?
@CodeExplained
@CodeExplained 3 жыл бұрын
github.com/CodeExplainedRepo/shopping-cart-javascript
@shubhamjangid5936
@shubhamjangid5936 2 жыл бұрын
how to render the cart items on a diffrent cart page ? IM STUCK HERE :(
@CodeExplained
@CodeExplained 2 жыл бұрын
I think the cart items are saved to the local storage, so when going to another page, all you need to do, is to get items from the local storage, and render them to your new page.
@MamamimPlodtook
@MamamimPlodtook 3 жыл бұрын
Hi , i have try to follow code and i cannot manage changeNumberOfUnits because of onclick function.
@CodeExplained
@CodeExplained 2 жыл бұрын
How can I help you?
@tahirzaman9441
@tahirzaman9441 2 жыл бұрын
Waiting for your new videos...➡️➡️➡️➡️➡️ Js projects
@omiosomoy4706
@omiosomoy4706 2 жыл бұрын
this is a life saver
@olidhossen9785
@olidhossen9785 2 жыл бұрын
Nice
@sagarraut797
@sagarraut797 3 жыл бұрын
I want to add discount facility or buy one get free, how can I do that?
@CodeExplained
@CodeExplained 3 жыл бұрын
Add new properties to the products, { ... discount : 20, free_product: 1 } and take those in mind when calculating the subtotal.
@tigerwalkcommunications7426
@tigerwalkcommunications7426 2 жыл бұрын
Please on your next video make a checkout page😌
@mateenmahi
@mateenmahi Жыл бұрын
That's awesome
@zalisco1
@zalisco1 2 жыл бұрын
THANK YOU BROTHER
@CodeExplained
@CodeExplained 2 жыл бұрын
You are welcome
@azureliseraleighchocolatec6832
@azureliseraleighchocolatec6832 2 жыл бұрын
Great.
@mybMee
@mybMee 3 жыл бұрын
thanks 😊👍
@CodeExplained
@CodeExplained 3 жыл бұрын
You're welcome.
@sdfsdfsdffdsfsdfsd123
@sdfsdfsdffdsfsdfsd123 2 жыл бұрын
thank you !!!!
@CodeExplained
@CodeExplained 2 жыл бұрын
You're welcome!
@codingislife6387
@codingislife6387 2 жыл бұрын
Thank Sir.
@CodeExplained
@CodeExplained 2 жыл бұрын
You're welcome.
@ОнопрієнкоСергій-й3ю
@ОнопрієнкоСергій-й3ю Жыл бұрын
thanks so much
@21398403
@21398403 2 жыл бұрын
Thanks for the video and please add a New video with paypal button.
@Toast917
@Toast917 2 жыл бұрын
helping me with my APCSP class 🫶🙏
@jowarnis
@jowarnis 3 жыл бұрын
dude is using innerHTML to create elements.. I just cant.. terrible
@CodeExplained
@CodeExplained 2 жыл бұрын
hahah sorry
@deeeera
@deeeera 3 жыл бұрын
Thank you so much for this tutorial. It's of great help. However, I do have a problem. Your tutorial works just fine. But you see, I have 4 different sections (where you have the '.product's class) of products but your tutorial only works for one section and as such, I have only one section of products and 3 empty sections when I load the page. What can I do?
Create a Currency Converter WIth JavaScript HTML and CSS
1:06:52
Code Explained
Рет қаралды 7 М.
JavaScript Shopping Cart Tutorial - Part 1/5
13:55
Telmo Sampaio
Рет қаралды 249 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
All 34 String Methods In JavaScript In ONE VIDEO
1:30:25
Code Explained
Рет қаралды 15 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
Build a Shopping Cart with JavaScript - Project Tutorial
3:19:58
freeCodeCamp.org
Рет қаралды 430 М.
Beginner React.js Coding Interview (ft. Clément Mihailescu)
36:31
Ben Awad
Рет қаралды 2,2 МЛН
reduce Method | JavaScript Array Methods | Beginners tutorial
16:08
Code Explained
Рет қаралды 1,6 М.
Beginner Vanilla Javascript Project Tutorial
1:15:19
developedbyed
Рет қаралды 906 М.
5 Mini JavaScript Projects - For Beginners
1:45:09
Tech With Tim
Рет қаралды 114 М.
I Redesigned the ENTIRE YouTube UI from Scratch
19:10
Juxtopposed
Рет қаралды 884 М.
Click a Button, Destroy My Site
11:40
Hyperplexed
Рет қаралды 105 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН