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.
2 parents f903502 + dc5f0f5 commit bbb22b3Copy full SHA for bbb22b3
app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js
@@ -135,7 +135,9 @@ define([
135
// trigger global event, so other modules will be able add parameters to redirect url
136
$('body').trigger('catalogCategoryAddToCartRedirect', eventData);
137
138
- if (eventData.redirectParameters.length > 0) {
+ if (eventData.redirectParameters.length > 0 &&
139
+ window.location.href.split(/[?#]/)[0] === res.backUrl
140
+ ) {
141
parameters = res.backUrl.split('#');
142
parameters.push(eventData.redirectParameters.join('&'));
143
res.backUrl = parameters.join('#');
0 commit comments