We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce6c228 commit b370b1eCopy full SHA for b370b1e
app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
@@ -261,6 +261,9 @@ define([
261
$(document).trigger('ajax:removeFromCart', {
262
productIds: [productData['product_id']]
263
});
264
+ if (window.location.href === this.shoppingCartUrl) {
265
+ location.reload();
266
+ }
267
}
268
},
269
@@ -306,14 +309,10 @@ define([
306
309
307
310
})
308
311
.done(function (response) {
- var msg, currentURL;
312
+ var msg;
313
314
if (response.success) {
315
callback.call(this, elem, response);
- currentURL = window.location.pathname;
- if (currentURL.includes("/checkout/cart/")) {
- location.reload();
316
- }
317
} else {
318
msg = response['error_message'];
319
0 commit comments