Skip to content

Commit 0189714

Browse files
fixed back redirect for view order from edit customer
1 parent 72f72dd commit 0189714

File tree

2 files changed

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

2 files changed

+4
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ 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('sales/order/view', ['order_id' => $row->getId(), 'customer_id' => $this->getRequest()->getParam('id')]);
164164
}
165165

166166
/**

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)