0

Is there any way to reload the page completely, when we remove an item from mini cart. https://prnt.sc/11i1x2g After clicking on ok , i want to reload the page.

2
  • This solution may be useful to you magento.stackexchange.com/a/178226/7863 Commented Apr 16, 2021 at 8:49
  • No it did not work for me Commented Apr 16, 2021 at 10:48

1 Answer 1

0

You need to override _ajax function of

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

in your custom theme and add code to reload page after removing item from minicart as below

.done(function (response) { var msg; if (response.success) { callback.call(this, elem, response); window.location.reload(true);// CODE ADDED TO RELOAD PAGE AFTER REMOVING ITEM FROM MINICART SUCCESSFULLY } else { msg = response['error_message']; if (msg) { alert({ content: msg }); } } }) 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.