Skip to content

Commit 39e3bf3

Browse files
ENGCOM-5993: Fix url for back button on multishipping new shipping address #24827
- Merge Pull Request #24827 from MaxSouza/magento2:fix-24701 - Merged commits: 1. 7c5e717 2. a528841 3. 88532ef 4. ecb2249 5. fded460
2 parents 419fbf3 + fded460 commit 39e3bf3

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

app/code/Magento/Multishipping/Controller/Checkout/Address/NewShipping.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\Multishipping\Controller\Checkout\Address;
87

9-
class NewShipping extends \Magento\Multishipping\Controller\Checkout\Address
8+
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
9+
use Magento\Multishipping\Controller\Checkout\Address;
10+
11+
/**
12+
* Class NewShipping
13+
*
14+
* @package Address
15+
*/
16+
class NewShipping extends Address implements HttpGetActionInterface
1017
{
1118
/**
1219
* Create New Shipping address Form
@@ -35,7 +42,7 @@ public function execute()
3542
if ($this->_getCheckout()->getCustomerDefaultShippingAddress()) {
3643
$addressForm->setBackUrl($this->_url->getUrl('*/checkout/addresses'));
3744
} else {
38-
$addressForm->setBackUrl($this->_url->getUrl('*/cart/'));
45+
$addressForm->setBackUrl($this->_url->getUrl('checkout/cart/'));
3946
}
4047
}
4148
$this->_view->renderLayout();

app/code/Magento/Multishipping/Test/Unit/Controller/Checkout/Address/NewShippingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function executeDataProvider()
170170
{
171171
return [
172172
'shipping_address_exists' => ['*/checkout/addresses', 'shipping_address', 'back/address'],
173-
'shipping_address_not_exist' => ['*/cart/', null, 'back/cart']
173+
'shipping_address_not_exist' => ['checkout/cart/', null, 'back/cart']
174174
];
175175
}
176176

0 commit comments

Comments
 (0)