Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PayPal doesn't clear Minicart but cart #4114

Closed
grasdaggel opened this issue Apr 12, 2016 · 7 comments
Closed

PayPal doesn't clear Minicart but cart #4114

grasdaggel opened this issue Apr 12, 2016 · 7 comments
Assignees

Comments

@grasdaggel
Copy link

We have found a weird bug. If a customer is paying with PayPal the Minicart doesn't get cleared. However, the cart is empty, so if you click "go to cart" you see "there are no products in your cart".

Bug only occours when using PayPal out of sandbox mode.

How can we fix this? I was thinking about a session destroyer on the success.phtml but wasn't lucky to find a solution for this.

Any ideas? Its kinda important for us.

@grasdaggel
Copy link
Author

We are using:
PHP7
Magento 2.0.4

@orlangur
Copy link
Contributor

Since such blocks like Minicart are rendered on client side based on data stored in local storage, the fix is basically to specify actions which must invalidate particular sections of customer data: https://github.com/magento/magento2/blob/develop/app/code/Magento/Paypal/etc/frontend/sections.xml

So, probably some other actions than "paypal/express/placeOrder" and "paypal/payflowexpress/placeOrder" are involved when you are out of sandbox? I'm not sure such scenarios are frequently tested by the way.

@grasdaggel
Copy link
Author

Can you elaborate how to apply a fix here? Not sure if I want to change PayPal-core-files. :/

@orlangur
Copy link
Contributor

Look into Network tab of Developer Tools during your scenario and note actions involved in the process.

If there are some missing in section invalidation config, add them similar to:

<action name="paypal/express/placeOrder">
        <section name="cart"/>
        <section name="checkout-data"/>
    </action>

@alena-marchenko
Copy link

This issue is already fixed in develop branch, closing the issue.

@lgt
Copy link

lgt commented May 25, 2016

can you please paste a link to the fix. I have this bug on 2.0.7

@commcad
Copy link

commcad commented Jun 12, 2016

I have the same bug using 2.0.7 - 2.1.0rc1 - 2.1.0rc2

magento-engcom-team pushed a commit that referenced this issue Apr 25, 2019
-  Revert change of PR 3766 
- Fixed MC-16040 Fix data cleanup after test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants