31 lines
744 B
PHP
31 lines
744 B
PHP
|
<?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');
|
||
|
}
|
||
|
}
|
||
|
}
|