Skip to content

Commit 92198d1

Browse files
committed
[2.4.3-p1] Add to wishlist and add to compare not working.
1 parent a7281cd commit 92198d1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

view/frontend/web/js/action/submit-filter.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ define(
3232
layerContainer = $('.layered-filter-block-container'),
3333
quickViewContainer = $('#mpquickview-popup');
3434

35-
return function (submitUrl, isChangeUrl) {
35+
return function (submitUrl, isChangeUrl, method) {
3636
/** save active state */
3737
var actives = [],
3838
data;
@@ -50,6 +50,16 @@ define(
5050
if (typeof window.history.pushState === 'function' && (typeof isChangeUrl === 'undefined')) {
5151
window.history.pushState({url: submitUrl}, '', submitUrl);
5252
}
53+
if (method === 'post') {// For 'add to wishlist' & 'add to compare' event
54+
return storage.post(submitUrl).done(
55+
).fail(
56+
function () {
57+
window.location.reload();
58+
}
59+
).always(function () {
60+
loader.stopLoader();
61+
});
62+
}
5363

5464
return storage.get(submitUrl).done(
5565
function (response) {

0 commit comments

Comments
 (0)