bebeboutik/modules/categoryscroll/categoryscroll.php

31 lines
720 B
PHP
Raw Normal View History

2016-01-04 12:49:26 +01:00
<?php
class CategoryScroll extends Module {
public function __construct() {
$this->name = 'categoryscroll';
$this->tab = 'front_office_features';
$this->version = '1.0';
parent::__construct();
$this->displayName = $this->l('Category Scroll');
$this->description = $this->l('Allows to scroll without paginating on categories.');
}
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');
}
}
}