![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/extmag/shiplab/Controller/Rma/ |
<?php /** * Copyright © Extmag. All rights reserved. */ namespace Extmag\Shiplab\Controller\Rma; use Extmag\Shiplab\Controller\Rma; use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface; use Magento\Framework\Controller\ResultInterface; class View extends Rma implements HttpGetActionInterface { /** * Rma view * * @return ResultInterface * @throws \Exception */ public function execute() { $order = $this->orderRepository->get($this->getRequest()->getParam('order_id')); if (!$order || empty($carrierCode = $this->getCarrierCode($order)) || $this->manager->getConfig( $carrierCode . '_refund/customer/allow_print', $order->getStoreId(), 'refund', $order->getShippingAddress()->getCountryId() ) == 0 ) { $this->messageManager->addErrorMessage(__('Access denied')); return $this->resultRedirectFactory->create()->setPath( 'sales/order/view', ['order_id' => $order ? $order->getId() : null] ); } $this->coreRegistry->register('current_order', $order); $resultPage = $this->resultPageFactory->create(); $navigationBlock = $resultPage->getLayout()->getBlock('customer_account_navigation'); if ($navigationBlock) { $navigationBlock->setActive('sales/order/history'); } return $resultPage; } }