Jurist Posted May 28, 2021 Share Posted May 28, 2021 Hello, We use Prestashop 1.7 with latest PayPal module version. There is PayPal buy now button right next to the shopping cart on our product page. The only problem is, it removes products existing in cart before opening checkout. Example: 1. Customer has ProductA, ProductB, ProductC 2. goes to product page of ProductD 3. Clicks on add to cart on ProductD page. 4. Cart is emptied, checkout is opened only with ProductD. Is there any way to stop PayPal from removing products from shopping cart? I've noticed that PayPal button during checkout works perfectly fine. It created PayPal express window with all the products that were in shopping cart. Link to comment Share on other sites More sharing options...
202ecommerce Posted June 8, 2021 Share Posted June 8, 2021 Hello, Thank you for your message. When a customer purchases via PayPal button on a product sheet, the module only takes into account the product in question. This is an instant purchase that is done directly via the product sheet. The behavior of the module is correct and complies with PayPal rules. PayPal buy button can be also added to the shopping cart as well. In this case all products added to the cart will be taken into account. Do not hesitate if you have any additional questions. Have a nice day ! Link to comment Share on other sites More sharing options...
Jurist Posted June 10, 2021 Author Share Posted June 10, 2021 I see how it works. Would in such case be possible to use shopping cart behaviour on product page? When someone clicks Pay with Paypal, it first executes add to cart and then opens standard PayPal checkout window. In fact, I tried to do it myself, but it seems to be impossible since PayPal button is displayed in an iframe and because of samesite policy it is impossible to execute events on elements displayed in iframe from another domain. Do you offer customisation for that? Link to comment Share on other sites More sharing options...
202ecommerce Posted June 23, 2021 Share Posted June 23, 2021 Hello, We are sorry but this behavior is recommended by PayPal. PayPal shortcuts on product pages work well for the shops with mono product. It you have a large catalog it is better to disable shortcut on the product pages and keep it enabled only on the cart page and 1st step of the checkout. Thank you for understanding. Have a nice day ! Link to comment Share on other sites More sharing options...
Jurist Posted June 24, 2021 Author Share Posted June 24, 2021 (edited) I am sure it can be done, but the paypal integration would need to be done the other way, without iframe. I guess we will need to work on some kind of workaround then. Thanks for your reply though. Edited June 24, 2021 by Jurist (see edit history) Link to comment Share on other sites More sharing options...
Jurist Posted June 25, 2021 Author Share Posted June 25, 2021 We created a workaround to this. Now popup opens when someone clicks paypal/amazon button and there's more information there. If cart is empty, the button shows notification to add products to shopping cart. If cart is not empty, it opens a regular paypal checkout (the same as in cart/login page). Hopefully this will sort out the issue. However we are facing another problem now. Sometimes when the page is refreshed, PayPal button is just not loaded. No idea why this is happening, we also do same integration for amazon pay and all works great. It happens that the button is not displayed until I press ctrl + F5. What could be the reason of that happening? maybe I should move the module to the very top or very bottom in the hook list? Can it be caused by cache module? Link to comment Share on other sites More sharing options...
Jurist Posted August 10, 2021 Author Share Posted August 10, 2021 (edited) @202 ecommerce could you help me on fixing the issues related to PayPal module for PS 1.7 please? We use latest PayPal module 5.4.4 and we have PS 1.7.6. We get the following errors with PayPal module enabled: shortcut.js?v=5.4.4:formatted:86 Uncaught TypeError: prestashop.on is not a function at Object.init (shortcut.js?v=5.4.4:formatted:86) at waitPaypalIsLoaded (duschrinne-wiper-premium-600-mm-ponente:3180) and another error: Uncaught ReferenceError: jQuery is not defined at jquery-migrate-1.2.1.min.js:2 It is caused by PayPal JS being loaded too high in the site, before prestashop object is initialised. Is there a way to push the PayPal to the bottom of the list of the loaded items? I think this would resolve both problems. Thanks Edited August 10, 2021 by Jurist (see edit history) Link to comment Share on other sites More sharing options...
202ecommerce Posted August 11, 2021 Share Posted August 11, 2021 Hi, please write to our support service: https://addons.prestashop.com/contact-form.php?id_product=1748 202-ecommerce Team Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now