47 $result = $this->orderLoader->load($this->_request);
52 $shipmentId = (int)$this->
getRequest()->getParam(
'shipment_id');
54 $shipment = $this->_objectManager->create(\
Magento\Sales\Model\Order\Shipment::class)->load($shipmentId);
57 $order = $this->_coreRegistry->registry(
'current_order');
59 if ($this->orderAuthorization->canView(
$order)) {
61 $this->_coreRegistry->register(
'current_shipment',
$shipment);
63 return $this->resultPageFactory->create()->addHandle(
'print');
65 return $this->resultRedirectFactory->create()->setPath(
'sales/guest/form');
__construct(Context $context, OrderViewAuthorization $orderAuthorization, \Magento\Framework\Registry $registry, PageFactory $resultPageFactory, OrderLoader $orderLoader)
foreach($order->getItems() as $orderItem) $shipment