_coreRegistry = $coreRegistry; $this->_shippingInfoFactory = $shippingInfoFactory; $this->_orderFactory = $orderFactory; parent::__construct($context); } /** * Popup action * Shows tracking info if it's present, otherwise redirects to 404 * * @return void * @throws NotFoundException */ public function execute() { $shippingInfoModel = $this->_shippingInfoFactory->create()->loadByHash($this->getRequest()->getParam('hash')); $this->_coreRegistry->register('current_shipping_info', $shippingInfoModel); if (count($shippingInfoModel->getTrackingInfo()) == 0) { throw new NotFoundException(__('Page not found.')); } $this->_view->loadLayout(); $this->_view->getPage()->getConfig()->getTitle()->set(__('Tracking Information')); $this->_view->renderLayout(); } }