Skip to content

Commit 58fe777

Browse files
ENGCOM-5526: Fixed back redirect for view order from edit customer #23882
- Merge Pull Request #23882 from ravi-chandra3197/magento2:patch-order-view-customer-redirect - Merged commits: 1. 0189714 2. 03ec571 3. fbc649e 4. 10f3cca
2 parents cea3e79 + 10f3cca commit 58fe777

File tree

2 files changed

+7
-1
lines changed
  • app/code/Magento

2 files changed

+7
-1
lines changed

app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ protected function _prepareColumns()
160160
*/
161161
public function getRowUrl($row)
162162
{
163-
return $this->getUrl('sales/order/view', ['order_id' => $row->getId()]);
163+
return $this->getUrl(
164+
'sales/order/view',
165+
['order_id' => $row->getId(), 'customer_id' => $this->getRequest()->getParam('id')]
166+
);
164167
}
165168

166169
/**

app/code/Magento/Sales/Block/Adminhtml/Order/View.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,9 @@ protected function _isAllowedAction($resourceId)
449449
*/
450450
public function getBackUrl()
451451
{
452+
if ($this->getRequest()->getParam('customer_id')) {
453+
return $this->getUrl('customer/index/edit', ['id'=> $this->getRequest()->getParam('customer_id')]);
454+
}
452455
if ($this->getOrder() && $this->getOrder()->getBackUrl()) {
453456
return $this->getOrder()->getBackUrl();
454457
}

0 commit comments

Comments
 (0)