0

I have a requirement to implement Google Pay in PDP. Like Buy with GPay in PDP. So once user click Buy Now with GPay button then we are adding that product to cart and once payment is done then we are converting that cart to order - this is normal procedure and its working fine. But what if that user is having already some products in cart ?. How I can implement to buy that particular product without touching the cart ? Is there anything like Multi cart functionality or any API available to meet this requirement ?

1 Answer 1

1

You will have to create cart to create order in Magento but you can always save the existing cart id in the customer session and set it back as customer's active cart once the customer is done with purchase with gpay.

4
  • Thanks for your support, this will only work for Registered user. We cant use this method for Guest User.
    – Elavarasan
    Jan 11 at 15:09
  • If the feature needs to work with guests too, you can use checkout session. Jan 12 at 5:20
  • Sorry, I didnt get your point.
    – Elavarasan
    Jan 12 at 13:06
  • You can use checkout session to store the cart id instead of customer session if you want it to work for guest users as well. Jan 12 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.