bebeboutik/modules/expresscart/expresscart.php
Srv Bebeboutik 6c0978166c add modules
2016-01-04 12:49:26 +01:00

31 lines
744 B
PHP
Executable File

<?php
class ExpressCart extends Module {
public function __construct() {
$this->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() {
if($id_category = Tools::getValue('id_category')) {
global $smarty;
$smarty->assign('id_category', $id_category);
return $this->display(__FILE__, 'header.tpl');
}
}
}