コード例 #1
0
 public function getHeader()
 {
     $parent_header = parent::getHeader();
     if (!isset($this->order) or !Validate::isLoadedObject($this->order)) {
         return $parent_header;
     }
     if (!Module::isInstalled('agilemultipleseller')) {
         return $parent_header;
     }
     require_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
     $id_seller = AgileSellerManager::getObjectOwnerID('order', $this->order->id);
     $sellerinfo = new SellerInfo(SellerInfo::getIdBSellerId($id_seller), $this->order->id_lang);
     $seller_logo_path = SellerInfo::seller_logo_physical_path($sellerinfo->id);
     if (!file_exists($seller_logo_path)) {
         $seller_logo_path = false;
     }
     $this->smarty->assign(array('seller_name' => $sellerinfo->company, 'seller_logo_path' => $seller_logo_path, 'seller_logo_url' => SellerInfo::get_seller_logo_url_static($sellerinfo->id), 'sellerinfo' => $sellerinfo));
     return $this->smarty->fetch($this->getTemplate('header'));
 }