Magento – Magento2 – Reload page after remove item from Minicart

magento2mini-cart

I have been trying to reload the page after removing item from Minicart in Magento2, Can anyone help on this.

Best Answer

Copy sidebar.js file from below path

vendor/magento/module-checkout/view/frontend/web/js

And create a file have below path

app/design/frontend/{ your vendor}/{your theme}/Magento_Checkout/web/js

And Change line 192

_removeItemAfter: function (elem, response) {
        },

to

_removeItemAfter: function (elem, response) {
            window.location.reload(); 
        },

And After Run below Command :

php bin/magento setup:static-content:deploy