Javascript Project - Shopping Cart

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2018
  • Javascript Project - Shopping Cart
    Products I Use:
    Microphone - Shure SM7B - amzn.to/3fX55aD
    Headphones - Shure AONIC 50 - amzn.to/3zbkxHC
    Desk-Mounted Microphone Stand - amzn.to/3x3MBuS
    Crossover - dbx 234s - amzn.to/3xcryGC
    Audio Interface - Focusrite Scarlett 2i2 3rd Gen - amzn.to/3pt1wMx
    Cheaper Microphone (My first mic) - Blue Yeti USB Mic amzn.to/3iliwTm
    Blue Light Blocking Glasses - amzn.to/3fZASrv
    Apple MacBook Pro 13.3" - amzn.to/3z5QDEK
    iMac - amzn.to/3glWmOe
    Second Monitor - LG 4K UHD 27UD88 - amzn.to/3ckdwdV
    Wifi Router - TP-Link AC1900 - amzn.to/34ZSddz
    Desk Chair - amzn.to/3ikNbQJ
    Standing Desk - amzn.to/3zdKVAJ
    Books I Recommend:
    The Subtle Art of Not Giving a F*ck - amzn.to/3v9t8Yi
    The Tipping Point - amzn.to/3gCslKj
    Atomic Habits - amzn.to/3x52xNa
    12 Rules for Life - amzn.to/3gln8pN
    Deep Work - amzn.to/3cyAgqu
    Digital Minimalism - amzn.to/3gao69A
    A World Without Email - amzn.to/351Swoe
    Rich Dad Poor Dad - amzn.to/3v8RWQ6
    Rich Dad's Cashflow Quadrant - amzn.to/3ivt1Uk
    Check out My Amazon Store for more products and books recommendations - www.amazon.com/shop/codingaddict
    Disclosure: This video is not sponsored. Some links above are affiliate links, and l may earn a small commission from any purchases at no additional cost to you. Thank you for supporting my channel!
    Source Files
    github.com/john-smilga/js-car...
    COUPONS BELOW!!!!!!
    BOOTSTRAP COURSE
    www.udemy.com/bootstrap-4-bet...
    www.udemy.com/bootstrap-4-bet...
    JAVASCRIPT COURSE
    www.udemy.com/javascript-tuto...
    IN DEPTH HTML AND CSS
    www.udemy.com/in-depth-html-c...
    RESPONSIVE WEBISTES
    www.udemy.com/responsive-webs...
    JQUERY COURSE
    www.udemy.com/jquery-tutorial...
    FLEXBOX COURSE
    www.udemy.com/css-flexbox-tut...
    GRID COURSE
    www.udemy.com/css-grid-tutori...
    RESPONSIVE COFFEE SHOW WEBSITE
    www.udemy.com/responsive-coff...
    RESPONSIVE CAR DEALERSHIP
    www.udemy.com/responsive-car-...

ความคิดเห็น • 123

  • @rdfn7
    @rdfn7 3 ปีที่แล้ว +1

    Once again, another awesome project done. Thank you so much John!

    • @aboodibajaman9975
      @aboodibajaman9975 2 ปีที่แล้ว

      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

  • @mosescodes3677
    @mosescodes3677 5 ปีที่แล้ว +1

    I love this guy!!! you are the best for me. Thank you so much

  • @kunnudev7250
    @kunnudev7250 4 ปีที่แล้ว +2

    Brother you are doing great job please continue awesome videos.

  • @chrissythompkin2089
    @chrissythompkin2089 5 ปีที่แล้ว +4

    Thanks a million, great tutorial!

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt 5 ปีที่แล้ว +3

    Thank u for this awesome video

  • @loydcose2780
    @loydcose2780 2 ปีที่แล้ว +1

    You're the best man 🙌

  • @BillionaireBelief
    @BillionaireBelief 3 ปีที่แล้ว

    Dope tutorial. You have a new subscriber!

  • @codeusz3k18
    @codeusz3k18 4 ปีที่แล้ว +1

    Coding Addict "Let me make sure that im spelling this correctly, because it is not gonna work if its not written corectly" Thats why i love you :D simple straight and genius at once :D

  • @hamzaansari7715
    @hamzaansari7715 5 ปีที่แล้ว +4

    thank you very much sir. learned a lot

  • @Ivan-qb9cs
    @Ivan-qb9cs 5 ปีที่แล้ว

    Great content, keep them coming

  • @fatemehyosefi1018
    @fatemehyosefi1018 3 ปีที่แล้ว +1

    Awesome😍😍, thank you teacherrrr💖💖

  • @teddylong588
    @teddylong588 2 ปีที่แล้ว +1

    This dude is a blessing!!!!!

  • @gurkansuzen2638
    @gurkansuzen2638 4 ปีที่แล้ว

    Thank you so much. Is there a tutorial for checkout page to insert database using php for shopping cart ?

  • @serggonta4574
    @serggonta4574 5 ปีที่แล้ว +5

    perfect explanations. doing simple projects like this is the best way to learn any programming language. Theory is good by itself, but once you heard there you forgot it. but these projects are just perfect. so just keep creating new JS projects like this and the number of your folowers will always increase

    • @emorysaint7116
      @emorysaint7116 3 ปีที่แล้ว

      i guess it is kinda off topic but do anyone know of a good site to stream newly released series online?

    • @amirmichael6390
      @amirmichael6390 3 ปีที่แล้ว

      @Emory Saint I use Flixzone. Just search on google for it :)

    • @robertsincere3964
      @robertsincere3964 3 ปีที่แล้ว

      @Amir Michael yup, I have been using Flixzone for months myself :)

    • @emorysaint7116
      @emorysaint7116 3 ปีที่แล้ว

      @Amir Michael Thank you, I signed up and it seems to work :) I really appreciate it !!

    • @amirmichael6390
      @amirmichael6390 3 ปีที่แล้ว

      @Emory Saint you are welcome :D

  • @mistersz
    @mistersz 5 ปีที่แล้ว

    very nice work. great design !

  • @ulyssesglemao6783
    @ulyssesglemao6783 5 ปีที่แล้ว

    Please answer how to make the filter button and search function?

  • @sameralsudani7192
    @sameralsudani7192 5 ปีที่แล้ว +1

    Good job

  • @cavidhummatov4431
    @cavidhummatov4431 5 ปีที่แล้ว +1

    what's gonna happen when you have more than 6 items in your cart? I mean doesnt it get overflowed the height size of the page?

  • @crissirbu6067
    @crissirbu6067 5 ปีที่แล้ว

    thank you alot for this well explained and helpful video

  • @timoruslim
    @timoruslim 4 ปีที่แล้ว +1

    how do i make the delet buttons work and update both the total price and item count?

  • @ziyabnajeeb
    @ziyabnajeeb 5 ปีที่แล้ว

    Very good Tutorial, however I have a question, why did you use self invoking anonymous function?

  • @tophyyamar8687
    @tophyyamar8687 5 ปีที่แล้ว

    It's awesome.

  • @TheRealKman
    @TheRealKman 5 ปีที่แล้ว

    What is the slice method because it says full path is not defined

  • @tophyyamar8687
    @tophyyamar8687 5 ปีที่แล้ว

    Is there a second part of this?

  • @kehkashaankhanuma3116
    @kehkashaankhanuma3116 3 ปีที่แล้ว

    Can I know the next step to implement Clear cart and Checkout section

  • @ErikaAguirreHouston
    @ErikaAguirreHouston 5 ปีที่แล้ว +5

    Awesome video, thanks so much for sharing!!

  • @aboodibajaman9975
    @aboodibajaman9975 2 ปีที่แล้ว

    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

  • @dheerajhj6674
    @dheerajhj6674 5 ปีที่แล้ว

    where is the part two of the video ?

  • @shawlornewest9752
    @shawlornewest9752 3 ปีที่แล้ว

    How can I make my navbar and my shopcart menu stick while i'm scrolling??

  • @emirhancelebi8316
    @emirhancelebi8316 5 ปีที่แล้ว +2

    if you're planing to make a follow-up of this tutorial please consider adding functionality showing cart is empty message in the toggle bar when it is empty.

  • @abdullahbutt4166
    @abdullahbutt4166 4 ปีที่แล้ว

    But i am making a project in php and now i need a cart can i implement this?

  • @cedrio1027
    @cedrio1027 5 ปีที่แล้ว

    great video thank you very much

  • @HoaNguyen-un4qe
    @HoaNguyen-un4qe 5 ปีที่แล้ว

    why is the js not working through the gifthub

  • @soyoungk9673
    @soyoungk9673 5 ปีที่แล้ว +1

    Thanks!!!!👍

  • @daydreamhero1374
    @daydreamhero1374 5 ปีที่แล้ว

    The addEventListener is not working in IE edge. It will work in other browsers. What worked for me in IE edge is, you need to properly close the meta tags:

  • @egist4121
    @egist4121 3 ปีที่แล้ว +1

    Thank you!

  • @koreanhomechef8559
    @koreanhomechef8559 2 ปีที่แล้ว

    thank you very much and it is really helpful for learning Javascript for beginner like me. Can I get the Javascript what you coded?

  • @tunamusic2314
    @tunamusic2314 3 ปีที่แล้ว +1

    thanks bro so much

  • @zydhussain8450
    @zydhussain8450 4 ปีที่แล้ว +1

    Uncaught SyntaxError: Unexpected token
    where is the opening of line img src="img-cart/cake-2.jpeg" class="img-fluid rounded-circle" id="item-img" alt="">

  • @alebupeseyie5622
    @alebupeseyie5622 3 ปีที่แล้ว +1

    Your video content is mesmerizing and awesome. Thank you coding addict.

  • @romankorniienko2388
    @romankorniienko2388 5 ปีที่แล้ว

    ty for this project

  • @INKWEON7269
    @INKWEON7269 5 ปีที่แล้ว

    Thanks!! It's great tutorial video! I want to learn other function. ex) clear. delete ^^

  • @iliyasmohammed6192
    @iliyasmohammed6192 5 ปีที่แล้ว

    please provide the html, css, bootstrap video part of this video.

  • @karthiksaravanank.r122
    @karthiksaravanank.r122 4 ปีที่แล้ว

    Bro iam new for a programing i want to do a project in Java script.
    I do what you are do in this video i put in a netbeans it is ok

  • @blaqthedeveloper
    @blaqthedeveloper 3 ปีที่แล้ว

    thanks you for the video but what if your store is in another page

  • @toro705
    @toro705 5 ปีที่แล้ว

    app.js is empty in repo

  • @dazewaker262
    @dazewaker262 5 ปีที่แล้ว +1

    Are you saul from Better Call Saul,Breaking Bad ???Your voice is so similar to his.....LOL

  • @mohammadanarul624
    @mohammadanarul624 5 ปีที่แล้ว

    thank you so much....

  • @surajprajapati5763
    @surajprajapati5763 5 ปีที่แล้ว

    i need this code pls send me link downld this code

  • @techthred6595
    @techthred6595 3 ปีที่แล้ว +1

    thank you

  • @earlmichaelcabaluna7045
    @earlmichaelcabaluna7045 5 ปีที่แล้ว

    Uncaught Syntax Error: Unexpected Token
    what's this???

  • @syednoohu8692
    @syednoohu8692 4 ปีที่แล้ว

    Hi, where is the COUPON PLS

  • @erykkryszewski5803
    @erykkryszewski5803 5 ปีที่แล้ว +19

    I deleted this alert and did it a bit better way imo.
    let itemImg = event.target.parentElement.previousElementSibling;
    itemImg.classList.add('opacity');
    and then i created a class in css .opacity {
    opacity: 0.3;
    }
    Now after buying some product, they lose their opacity to show us that it is already bought :)

    • @erykkryszewski5803
      @erykkryszewski5803 5 ปีที่แล้ว

      @Pi no chlop ogolnie zna sie na programowaniu i pisaniu dobrych linijek kodu ale co do wizualnej kwestii to jego stronki wygladaja przecietnie :D

    • @mpotisambo2465
      @mpotisambo2465 5 ปีที่แล้ว +1

      hey sorry sir i need help with how to delete products from the cart using this project can you pliz help me out am in need of it i have tried looking for that code but have failed am new in programming so pliz help me out

  • @akbarasbahi3735
    @akbarasbahi3735 4 ปีที่แล้ว +1

    Keep deleting card what happened?

  • @Magistrado1914
    @Magistrado1914 4 ปีที่แล้ว

    Excellent tutorial
    21/02/2020

  • @earlmichaelcabaluna7045
    @earlmichaelcabaluna7045 5 ปีที่แล้ว

    hi sir my pictures are not working

  • @karthiksaravanank.r122
    @karthiksaravanank.r122 4 ปีที่แล้ว +1

    Bro where the image putting

  • @shisho8700
    @shisho8700 4 ปีที่แล้ว

    with imgSrc you could use getAttribute();

  • @saifqureshi637
    @saifqureshi637 5 ปีที่แล้ว +1

    What about delete item from cart?
    How can i remove a particular item from cart by clicking on delete icon?

    • @CodingAddict
      @CodingAddict  5 ปีที่แล้ว +1

      I cover it in this video:
      th-cam.com/video/90PgFUPIybY/w-d-xo.html

  • @outofme3874
    @outofme3874 4 ปีที่แล้ว +1

    great video thanks I learned alot.... please i'm trying to delete and clear the item in the cart but i'm having some difficulties please guide me

    • @yadjnishnursiah8621
      @yadjnishnursiah8621 4 ปีที่แล้ว

      hello im stuck with the alert, can you help me sort this out please ?

    • @SH-lt2iv
      @SH-lt2iv 4 ปีที่แล้ว +2

      (function deleteItem() {
      console.log('deleting item')
      const deletebtns = document.querySelectorAll('.fa-trash')
      console.log(deletebtns)
      deletebtns.forEach((btn) => {
      console.log(btn)
      btn.addEventListener('click', (e) => {
      console.log(e.target.parentElement.parentElement)
      const target = e.target.parentElement.parentElement
      target.remove()
      // update total on delete call
      showTotal()
      })
      })
      })();

  • @nurulfarhana2773
    @nurulfarhana2773 3 ปีที่แล้ว

    can anybody help me? it's so urgenttttt... who know how to pass the cart item to be displayed on the other page? PLEASE HELP MEEEE :'(

  • @Akunov-oy9mx
    @Akunov-oy9mx 5 ปีที่แล้ว

    app.js:21 Uncaught ReferenceError: fulPath is not defined
    at HTMLSpanElement.
    how to solve the problem?

    • @muhammadfaateh6463
      @muhammadfaateh6463 5 ปีที่แล้ว

      look where fulpath is defined, i think you have misspelled it it should be double ll in fullPath

  • @user-zi1nv3iy1m
    @user-zi1nv3iy1m 5 ปีที่แล้ว +1

    Uncaught SyntaxError: Unexpected token <
    what is wrong?

    • @muhammadfaateh6463
      @muhammadfaateh6463 5 ปีที่แล้ว

      post complete code

    • @yadjnishnursiah8621
      @yadjnishnursiah8621 4 ปีที่แล้ว

      @@muhammadfaateh6463 did it work for you ? i need some help! something is wrong with my alert! help me please!

  • @earlmichaelcabaluna7045
    @earlmichaelcabaluna7045 5 ปีที่แล้ว

    its working sir but its undefined

  • @fathimathafrin6486
    @fathimathafrin6486 5 ปีที่แล้ว

    Did u use bootstrap in this project?

    • @kamaboko1
      @kamaboko1 5 ปีที่แล้ว

      Yes, he did

  • @earlmichaelcabaluna7045
    @earlmichaelcabaluna7045 5 ปีที่แล้ว

    hi sir can i get the codes

  • @abhisheaka3277
    @abhisheaka3277 4 ปีที่แล้ว

    Thankyou sir!

  • @earlmichaelcabaluna7045
    @earlmichaelcabaluna7045 5 ปีที่แล้ว

    my pictures in the shopping cart

  • @cedrio1027
    @cedrio1027 5 ปีที่แล้ว +2

    dude could you give me a hint how to continue practicing javascript? I did the course in udemy and I learned well, but javascript seems like I can not develop

    • @ryanadi6016
      @ryanadi6016 5 ปีที่แล้ว +2

      My advice is by creating simple project. Something like todo list, calculator, text editor, or quizzes. In my experience, it helps me a lot to understand the dom structure and else. Go to js.bin and play javascript in there

    • @cedrio1027
      @cedrio1027 5 ปีที่แล้ว +3

      @@ryanadi6016 thanks for reply friend, I'm trying to learn javascript and it seems impossible
      I think my main problem is that I do not know how it is used, they only say that it is used on the web to make the website more dynamic, and I can not go deeper than that
      and people only teaches such of the exercise of the calculator, I wanted to go further
      I'm looking for projects to understand their functionality.

    • @ryanadi6016
      @ryanadi6016 5 ปีที่แล้ว

      @@cedrio1027 well everyone has its own way i guess. I'm just like you 3month ago, only learning from codecademy, not building any real application. 1 month passed and i think i dont make any progress. So, i embrace myself to build to do list app using javascript.
      Its really hard for me to start you know. Because im never learn anything about getElementById or anything else in codecademy. But once you did it and succeed. You will be addicted to it. Thats happened to me and i cant sleep without doing 1 line of code.
      I cant tell myself if im professional, but i build 10 project in 2 month. And right now im learning framework.
      I really hope that you can get out from your impossible mind. Stay cheers dude

    • @cedrio1027
      @cedrio1027 5 ปีที่แล้ว

      thx man

  • @Tobbergur
    @Tobbergur 5 ปีที่แล้ว

    Hi, thanks for the tutorial, it is really detailed and nice to follow. I am having one problem tho, how would I subtract from the total when using the delete from cart button? I've got the delete button working using this function but I cant figure out how to update the total:
    function deleteFromCart(deleteItem){
    const cartDeleteBtn = document.querySelectorAll('.cart-item-remove');
    cartDeleteBtn.forEach(function(btn){
    btn.addEventListener('click',function(event){
    if(event.target.parentElement.classList.contains('cart-item-remove')){

    let fullPath = event.target.parentElement.parentElement;
    fullPath.remove();
    }
    });
    });
    }

    • @CodingAddict
      @CodingAddict  5 ปีที่แล้ว

      We did 3 to-do projects with removing items. You can use functions from those projects

    • @Tobbergur
      @Tobbergur 5 ปีที่แล้ว

      @@CodingAddict I found out how to remove items, do you have any videos on managing when the same item is added multiple times to the cart to add something like (2) at the end and setting the price up?

    • @CodingAddict
      @CodingAddict  5 ปีที่แล้ว

      Not yet

    • @timoruslim
      @timoruslim 4 ปีที่แล้ว

      @@Tobbergur how did u do it, im very noob to this and i have watches other tutorials and cant seem to get it work

  • @aliezadkhaha9439
    @aliezadkhaha9439 5 ปีที่แล้ว

    one opening div two closing div.

  • @skyxerxes5620
    @skyxerxes5620 5 ปีที่แล้ว

    my partPath not working, why is that?
    there an error stating partPath cant find the img
    th-cam.com/video/0I1TorcXFP0/w-d-xo.html

  • @pabloce2628
    @pabloce2628 4 ปีที่แล้ว

    All working code: github.com/Pawel-Chmiel/sweets-store, live: pawel-chmiel.github.io/sweets-store/

  • @k.a.3877
    @k.a.3877 5 ปีที่แล้ว

    Hi is this shopping cart with local storage?

    • @CodingAddict
      @CodingAddict  5 ปีที่แล้ว

      No. I did other projects with local storage first and did not use local storage in this project

    • @k.a.3877
      @k.a.3877 5 ปีที่แล้ว

      and if I click on the About button...will all the products be saved in the shopping cart?
      :s

    • @k.a.3877
      @k.a.3877 5 ปีที่แล้ว

      Oh I see... i find it very difficult to add the local storage...where do I need to put the code for the local storage? I need to do a school project and I don't have that much knowledge of Js :/

  • @pratikbhandari6679
    @pratikbhandari6679 4 ปีที่แล้ว +1

    you sound a lot like Vito Corleone from The Godfather
    anybody notice that?

  • @The_PacificOcean
    @The_PacificOcean 5 ปีที่แล้ว

    app.js is empty in your project folder.

    • @CodingAddict
      @CodingAddict  5 ปีที่แล้ว

      correct. setup folder is only for html and css

  • @fathimathafrin6486
    @fathimathafrin6486 5 ปีที่แล้ว +2

    This project is incomplete, you did not explain about clear cart and checkout

    • @tommyshaw2420
      @tommyshaw2420 5 ปีที่แล้ว +2

      quit being unappreciative you prick

  • @ahiezerrivas2072
    @ahiezerrivas2072 5 ปีที่แล้ว

    please how to remove

    • @CodingAddict
      @CodingAddict  5 ปีที่แล้ว

      look at the playlist. it's the same logic as for todo list.there are 3 projects with todolist in the playlist

    • @ahiezerrivas2072
      @ahiezerrivas2072 5 ปีที่แล้ว

      thanks a lot men

  • @khaleder100
    @khaleder100 5 ปีที่แล้ว

    ${}; not working why ???

  • @ck0024
    @ck0024 5 ปีที่แล้ว

    *Visit **_freecodecamp.org_** channel for original video. Or click here: **th-cam.com/video/q_TZhCWbS3I/w-d-xo.html*

    • @CodingAddict
      @CodingAddict  5 ปีที่แล้ว

      Ha ha.
      So now I don't own my own videos.
      Thank you for letting me know.

    • @ck0024
      @ck0024 5 ปีที่แล้ว

      @@CodingAddict *Sorry! Sir, I thought someone pirated this video.*

  • @jamshidkarimov1021
    @jamshidkarimov1021 4 ปีที่แล้ว

    Always wanted real project using JavaScript. May God bless you, sir. Read Qur'an

  • @hofimastah
    @hofimastah ปีที่แล้ว

    Why not getting price like this?
    item.price = event.target.parentElement.parentElement.nextElementSibling.firstElementChild.lastElementChild.lastElementChild.innerText
    It returns price without space and $.