return $this->
redirectToRoute('frontend.account.edit-order.page',
['orderId' =>
$orderId]);
} try { $page =
$this->accountEditOrderPageLoader->
load($request,
$context);
} catch (OrderException
$exception) { $this->
addFlash(self::DANGER,
$this->
trans('error.' .
$exception->
getErrorCode(),
['%orderNumber%' =>
$order->
getOrderNumber()]));
return $this->
redirectToRoute('frontend.account.order.page'
);
} $this->
hook(new AccountEditOrderPageLoadedHook($page,
$context));
if ($page->
isPaymentChangeable() === false
) { $refundsEnabled =
$this->systemConfigService->
get('core.cart.enableOrderRefunds'
);
if ($refundsEnabled) { $this->
addFlash(self::DANGER,
$this->
trans('account.editOrderPaymentNotChangeableWithRefunds'
));
} else { $this->
addFlash(self::DANGER,
$this->
trans('account.editOrderPaymentNotChangeable'
));
} }