Django Ecom Part-13 | Update product quantity in cart and Remove cart item using jQuery AJAX

Поделиться
HTML-код
  • Опубликовано: 5 окт 2024
  • In this video, you will learn how to update the quantity of an item in the cart using jquery ajax. We will also be doing the remove item from cart using jquery and reload only the cart div.
    Source Code : www.fundacodes...
    Django Ecom Playlist : • Django Ecommerce Website
    If the video helps you, hit the like button and subscribe to the channel. If you have any doubts or suggestions, drop them in the comments below and i will answer them.
    Thanks for watching
    Buy me a coffee : www.buymeacoff...
    Follow me on instagram : / sharma_coder

Комментарии • 14

  • @kushbhun8885
    @kushbhun8885 2 года назад

    Thank you sir!

  • @jaysoncuaresma4
    @jaysoncuaresma4 2 года назад

    Sir can you help me about Sales Income for weekly, monthly and yearly for this project.

  • @nasruddinidris6059
    @nasruddinidris6059 2 года назад +1

    when i can delete item is success.. but when i try again to delete another data is not success..because the location can't load.. i try to change to location.reload() then the item is delete..

    • @SharmaCoder
      @SharmaCoder  2 года назад +1

      Watch out the next video about wishlist. We have solved this problem in the end of the video.

    • @nasruddinidris6059
      @nasruddinidris6059 2 года назад

      @@SharmaCoder tks sir..👍

  • @CandidClicksss
    @CandidClicksss 11 месяцев назад

    Hi Sir, I'm facing a issue on the update and remove in cart. I cross checked the code nothing wrong with that. I was facing an issue with add to cart functionality that uses ajax request, but that's automatically solved idk. Same issue on this update and remove in cart is happening. Please help me out of this....

    • @SharmaCoder
      @SharmaCoder  11 месяцев назад

      Will have to see the code. Without seeing the code, its hard to find out what's the problem

  • @bldbeta595
    @bldbeta595 2 года назад

    Hello, i am having some issues when i add to cart, lets say i want to add 3 items to cart, i press the button however when i go the cart section, it only appears as one, i dont where i could have gone wrong, may you please help me, thank you

    • @pradeepraja7424
      @pradeepraja7424 2 года назад +2

      In your cart.html file change the tag with 'value' as below

    • @hind3199
      @hind3199 2 года назад

      @@pradeepraja7424 showing empty quantity when write this

    • @brunoreis76
      @brunoreis76 Год назад +1

      @@pradeepraja7424 thank you! if it's according to sharma's code, value is : value="{{ item.product_qty }}"

  • @wrongdoer9252
    @wrongdoer9252 2 года назад +1

    prod_id = int(request.POST.get('product_id'))
    ValueError: invalid literal for int() with base 10: ' '
    please do help

    • @felixomundi1495
      @felixomundi1495 2 года назад +2

      just look on the cart html and make sure you are passing the right value in
      value="{{ item.product.id }}">

    • @subinkv6849
      @subinkv6849 11 месяцев назад

      Thanks a lot..@@felixomundi1495