name = 'expresscart'; $this->tab = 'front_office_features'; $this->version = '1.0'; parent::__construct(); $this->displayName = $this->l('Express Cart'); $this->description = $this->l('Adds a quick add-to-cart feature to the product list.'); } public function install() { if(!parent::install() OR !$this->registerHook('header')) { return FALSE; } return TRUE; } public function hookHeader() { global $smarty; $page_name = $smarty->getTemplateVars('page_name'); if($id_category = Tools::getValue('id_category')) { $smarty->assign('id_category', $id_category); return $this->display(__FILE__, 'header.tpl'); } if($page_name == 'product') { return $this->display(__FILE__, 'header2.tpl'); } } }