_getDataObj()->setIdByAccessCode(Qs_Array::get($this->_restParams, 0))) { $this->_do404(); } return parent::exec(); } protected function _doPrint() { $item = $this->_getDataObj()->getData(); if (empty($item)) { $this->_doc->display404(); } $templatePaths = $this->_getTemplatePath(); array_unshift($templatePaths, 'ECommerce/Order'); $this->_setTemplatePath($templatePaths); $this->_setViewHeader($item); $item['config'] = $this->getConfig()->toArray(); $item['printVersion'] = true; $item['backUrl'] = ($backUrl = $this->_getBackUrl(CURRENT_PAGE_FINAL)) ? $backUrl : CURRENT_PAGE_FINAL; $item['tpl'] = $this->getTemplate('view.tpl'); $this->_doc->setLayoutTemplate('PrintDoc/index.tpl'); $this->_doc->setBodyTemplate('PrintDoc/Body/default.tpl'); $this->_doc->addScript('js/print.js'); $this->_addItem($item); return $this; } }