shipmentLoader = $shipmentLoader; parent::__construct($context); } /** * Return grid with shipping items for Ajax request * * @return ResponseInterface */ public function execute() { $this->shipmentLoader->setOrderId($this->getRequest()->getParam('order_id')); $this->shipmentLoader->setShipmentId($this->getRequest()->getParam('shipment_id')); $this->shipmentLoader->setShipment($this->getRequest()->getParam('shipment')); $this->shipmentLoader->setTracking($this->getRequest()->getParam('tracking')); $this->shipmentLoader->load(); return $this->getResponse()->setBody( $this->_view->getLayout()->createBlock( \Magento\Shipping\Block\Adminhtml\Order\Packaging\Grid::class )->setIndex( $this->getRequest()->getParam('index') )->toHtml() ); } }