Paypal Payment Integration in E-commerce Website using Django | EP. 33

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ธ.ค. 2024

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

  • @nathanyinkas3491
    @nathanyinkas3491 10 หลายเดือนก่อน +2

    If we are getting the cart from the session, meaning that if after a user has added to the cart, there for adding to the cart session, if the admin update the price due to change in price, the new price will not be update in the session and the customer is going to pay for the old price .

    • @desphixs
      @desphixs  10 หลายเดือนก่อน +1

      Yes, but you can always rewrite the code to check, if the product price in session does not match as the product price in database, then clear the session and show a message that says, product price has been changed.

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

    Very excellent sir

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

    Thank you, sir. Please, You do mind explaining how you added those live data on the invoice?

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

      I grabbed them from the cart session, just like the way it's was on the cart and the checkout page

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

    But shouldn't there be a way to go back to the website? and if you go back to the website again the items are still in cart. shouldn't the cart be empty after buying the items? how to achieve that?

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

      Recently I found out a way, firstly you need to write your PayPal function in a way that, when the payment is completed it'll redirect to a successful page and display the product from the database based on Product ID that's appended to the url, and not from the session. You can also delete the session when payment is successful to clear the cart.
      I'll make a tutorial soon, explaining in detail; how to solve this issue.

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

      ​@@desphixs Actually I did something else. idk how to show you but, I removed the download button, and added a Shop more! button which calls a URL called "payment/success" which uses a view that deletes currents item in the cart.
      Though I'm not sure if it's the right way but take a look at the following code:
      def payment_success_redirect_home(request):
      cart_total_amount = 0
      if 'cart_data_obj' in request.session:
      del request.session['cart_data_obj']

      return redirect('core:index')

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

      also the reason I removed the download button and didn't just add another button to achieve what I did achieve was because the download button wasn't functioning properly it does download a pdf file but the file is blank with some random images. So also see if it's the same for you and if it is then please let us know how to fix it.

    • @shokhjahonisroilov8180
      @shokhjahonisroilov8180 4 หลายเดือนก่อน

      why not just at the page 'payment-completed/' delete everything from 'cart_data_obj' session?

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

    Why did you ignore the billing details I'll appreciate a tutorial on that. I'm currently creating a project that allows only pay on delivery and I think working with the billing details will be very essential for order placement. Thanks in advance

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

      Sure, I'll try to make a video on that

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

    Pure art

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

      thank you for taking the time to share your thoughts, I really appreciate it.

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

    Thank you sir