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

Cart Items are not deleted after success checkout #1461

Closed
vinhtrau opened this issue Jul 9, 2015 · 10 comments
Closed

Cart Items are not deleted after success checkout #1461

vinhtrau opened this issue Jul 9, 2015 · 10 comments
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@vinhtrau
Copy link

vinhtrau commented Jul 9, 2015

Is this new feature or is a bug?
screen shot 2015-07-09 at 09 56 14

@Zaylril
Copy link

Zaylril commented Jul 9, 2015

Just to add to this ticket. There is also a bug where things appear in the mini basket (and you don't complete the order) but when you go to the checkout it says your cart is empty, even though it still has items in your mini basket.

@vpelipenko
Copy link
Contributor

Duplicate of #1418. Internal ticket: MAGETWO-37603

@vpelipenko vpelipenko added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development MX bug report labels Jul 10, 2015
@kokoc kokoc added CS and removed MX labels Jul 14, 2015
@vpelipenko
Copy link
Contributor

Closed. #1418 is fixed and closed. @vinhtrau, please, verify it on the latest version.

@mukdam
Copy link

mukdam commented Feb 9, 2016

Hello,
I create custom order programmatic. But mini-cart have item

@grasdaggel
Copy link

Same here, the problem still exists.

@grasdaggel
Copy link

Dear @mukdam, please elaborate this fix. Its not very clear how to apply this.

AntonEvers pushed a commit to AntonEvers/magento2 that referenced this issue Jul 13, 2016
Fixes magento#4460 Fixes magento#4416 Fixes magento#1461 Fixes magento#4969 Fixes MAGETWO-52593

This method is executed on `controller_action_predispatch`. The outcome of the following controller will be affected by leaving `$this->checkoutSession->setLoadInactive` set `true`.

After placing an order the `customer/section/load` page is called from the checkout overview page to update the minicart and messages sections. Because of the `controller_action_predispatch` and the passing of all checks in `\Magento\Persistent\Observer\CheckExpirePersistentQuoteObserver::execute` `setLoadInactive` is left set to true and the expired quote is loaded one more time in the minicart, resulting in expired quote data the browser storage for the success page to display.

By the way, I saw this comment:

```php
!$observer->getControllerAction() instanceof \Magento\Checkout\Controller\Onepage
// persistent session does not expire on onepage checkout page to not spoil customer group id
```

customer/section/load is not a checkout onepage controller, but it most certainly is called in the checkout. So the check in `\Magento\Persistent\Observer\CheckExpirePersistentQuoteObserver::execute` does not fully fill the gap the way the comment implies.
AntonEvers pushed a commit to AntonEvers/magento2 that referenced this issue Jul 26, 2016
@jvhost
Copy link

jvhost commented Jul 7, 2017

FYI, commit 9093ce9 wasn't carried over to 2.1.7 CE .. after changing the 2 files manually it worked perfectly.

FYI # 2: I'm able to get away with just changing module-checkout/view/frontend/templates/success.phtml - just need the following lines before the final div:

<script>
    require([
        'Magento_Customer/js/customer-data'
        ], function (customerData) {
        var sections = ['cart'];
        customerData.invalidate(sections);
    });
</script>

magento-team pushed a commit that referenced this issue Sep 7, 2017
Fixed issues:
- MAGETWO-71215: [EAV] Junk attribute values created when scheduling new staging update
AntonEvers pushed a commit to AntonEvers/magento2 that referenced this issue Sep 10, 2017
Fixes magento#4460 Fixes magento#4416 Fixes magento#1461 Fixes magento#4969 Fixes MAGETWO-52593

(cherry picked from commit 9093ce9)
@Ctucker9233
Copy link

@magento-engcom-team This fix doesn't appear to be included in 2.2. Does it need to be ported?

@Ctucker9233 Ctucker9233 reopened this Feb 12, 2019
@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Feb 12, 2019
@ghost
Copy link

ghost commented Feb 14, 2019

Hi @vinhtrau this already ported to 2.2-develop, issue not reproducible on 2.2-branch

@ghost ghost closed this as completed Feb 14, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

9 participants