Skip to content

Commit efc1a09

Browse files
author
Valeriy Nayda
committed
Merge remote-tracking branch 'origin/MAGETWO-40136' into MAGETWO-35251
2 parents c35c622 + 3cf2b9d commit efc1a09

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ define([
7474
$('body').trigger(self.options.processStop);
7575
}
7676

77-
if (res.redirect) {
78-
window.location = res.redirect;
77+
if (res.backUrl) {
78+
window.location = res.backUrl;
7979
return;
8080
}
8181
if (res.messages) {

app/code/Magento/Checkout/Controller/Cart/Add.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ protected function goBack($backUrl = null, $product = null)
169169
$result = [];
170170

171171
if ($backUrl || $backUrl = $this->getBackUrl()) {
172-
$result['redirect'] = $backUrl;
172+
$result['backUrl'] = $backUrl;
173173
} else {
174174
if ($product && !$product->getIsSalable()) {
175175
$result['product'] = [

app/code/Magento/Customer/view/frontend/web/js/customer-data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ define([
134134
var sections = sectionConfig.getAffectedSections(settings.url);
135135
if (sections) {
136136
customerData.invalidate(sections);
137-
var redirects = ['redirect'];
137+
var redirects = ['redirect', 'backUrl'];
138138
if (_.isObject(xhr.responseJSON) && !_.isEmpty(_.pick(xhr.responseJSON, redirects))) {
139139
return ;
140140
}

0 commit comments

Comments
 (0)