Magento2: Instant Purchase on product page not working properly.

Created on 29 Mar 2019  路  27Comments  路  Source: magento/magento2

Instant Purchase on product page not working properly.

Preconditions (*)

Magento 2.3.1
PHP 7.2.15

Steps to reproduce (*)

With a well working Paypal Express Checkout, Configure magento settings as follow:

set yes to "Display on Product Details Page" (>configuration>sales>payment methods>paypal>express checkout)

set yes to "Enable Instant Purchase" (>configuration>Sales>instant purchase)

Expected result (*)

Correct behaviour is to show a button in product page to allow immediate purchase.
The button is correctly shown and when clicked the items is correctly added to the cart but it opens a paypal popup that loops infinitely.


Normal behaviour is to access to the paypal pannel to finalize payment

Actual result (*)

A paypal popup opens and loops infinitely.

Other issues:
Disabling "Instant Purchase" setting... the button in product page is shown anyway.
Disabling also "Display on Product Details Page"... the button in product page is shown anyway.

Please correct this bahaviour urgently as many customers are leaving the shop due for the incapacity to finalize payment.

Paypal Fixed in 2.3.x Clear Description Format is valid Reproduced on 2.2.x Reproduced on 2.3.x

Most helpful comment

Ok... tested!!!
I cannot make a full test as in this case I should put some private setting for Paypal profile.
Anyway after having configured 1 product and paypal setting with false data, in product page are shown 2 buttons (paypal, paypal credit). Clicking on paypal i receive an issue becouse obviously the settings are not correct. So I cannot test whether it loops!

I tryed to disable "Display on Product Details Page" and "Enable Instant Purchase" and in both cases the buttons are shown anyway.

Please do you have a workaround????

All 27 comments

Hi @afavata. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@afavata do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

@magento-engcom-team give me 2.3.1-develop instance

Hi @afavata. Thank you for your request. I'm working on Magento 2.3.1-develop instance for you

@afavata you can ask for 2.3-develop instance

@magento-engcom-team give me 2.3-develop instance

Hi @afavata. Thank you for your request. I'm working on Magento 2.3-develop instance for you

Hi @afavata, here is your Magento instance.
Admin access: https://i-22045-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

Ok... tested!!!
I cannot make a full test as in this case I should put some private setting for Paypal profile.
Anyway after having configured 1 product and paypal setting with false data, in product page are shown 2 buttons (paypal, paypal credit). Clicking on paypal i receive an issue becouse obviously the settings are not correct. So I cannot test whether it loops!

I tryed to disable "Display on Product Details Page" and "Enable Instant Purchase" and in both cases the buttons are shown anyway.

Please do you have a workaround????

Hi @Nazar65. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

@Nazar65 Thanks for having assigned this issue... please note it is reproducible on 2.3.1 and 2.3-develop, as well.

Hi, We have same issue with default luma theme on magento 2.3.1. "Display on Product Details Page" value change to "No" but nothing happen https://prnt.sc/n6sqwb, https://prnt.sc/n6srlx

It is there any temporary solution to hide product page paypal buttons?

@Nazar65 Hi... may you figure out how to disable temporary the buttons modifing codes?
Purchasers are leaving the website as the cannot finalized payment.

Thanks

Hi @afavata, currently i'm working on this, i will leave a temporary fix here as soon as possible.

Thanks Indeed!!!

@afavata temporary fix is to comment this line to disable this buttonsapp/code/Magento/Paypal/view/frontend/web/js/in-context/product-express-checkout.js
line 27 //this.renderPayPalButtons(element);
i'm will provide a pr soon

@Nazar65 Thank you indeed for the "temporary fix".

I do make note that for some (like me) the right path to product-express-checkout.js file is:

_vendor/magento/module-paypal/view/frontend/web/js/in-context/product-express-checkout.js_

This dipend on how Magento was installed.

@afavata i'm made a PR with proper fix for this.

@Nazar65 Well done Nazar... I have tested the updated code and now button is shown or hidden correctly depending on backend configuration setting. Thanks indeed.

Anyway there is a wrong bahaviour still to be resolved related to this opened issue #22045:
if button is enabled and paypal express well configured, clicking on the button.. the item is correctly added to the cart, a paypal windows popup on the screen but loops infinitely

@afavata ok, i'm will retest and try to fix this.

Hi @afavata i'm not able to reproduce second scenario.
deepin-screen-recorder_Select area_20190411103724

@Nazar65 Sorry for the delay in replying but out of the office for some days...
That's weird. I did multiple tests and all the time the Paypal panel keep stuck with the round circle running infinitely. I have no problem with Paypal in the standard checkout process.
Any suggest?

@afavata maybe this related to some of your configuration ?

@Nazar65 I'll double check and let you know...
thanks for your support

Hi @afavata. Thank you for your report.
The issue has been fixed in magento/magento2#22260 by @Nazar65 in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.3 release.

Hi, for us non-techy fellows, the fix is to replace the three files with those by @Nazar65 right?
I did that but the buttons continue to appear please see image

please help.
thanks alot!
Screenshot 2019-06-08 at 6 38 24

I am having the same problems + a PayPal related issue when trying to place an order in Magento Admin. When will Magento 2.3.3 update be released? Rough estimate. I hope that these bugs can be fixed. Thank you in advance.

Was this page helpful?
0 / 5 - 0 ratings