After clear(removing all products) shopping cart shows nothing, but still show count of products value on minicart.

Shopping cart still show number

tried to create sections.xml and flush cart after click 'distribution/cart/clear' route:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    <action name="distribution/cart/clear">
        <section name="cart"/>
        <section name="checkout-data"/>

but have fail.

here is link to flush cart on cart-info.phtml:

<li class="shopping-choise-item"><a id="clear-cart"  href="<?php echo $block->getClearCartUrl() ?>"><?= 'Empty cart' ?></a></li>

1 Answer 1


I've faced same issue on 2.2.6. The issue is fixed by upgrading the Magento version to the latest version 2.2.9.

You can upgrade your Magento version by run below commands from your terminal.

php bin/magento maintenance:enable
composer require magento/product-community-edition 2.2.9 --no-update
composer update
rm -rf var/ generated/
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento indexer:reindex
php bin/magento maintenance:disable

After upgrade, check your Magento version with the following command:

php bin/magento --version

Hope it helps!!!

  • do we have an issue on github? Sep 4, 2019 at 8:15
  • I didn't check this, but the Magento upgrade have solved my problem.
    – Sumit
    Sep 4, 2019 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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