31 lines
726 B
PHP
Executable File
31 lines
726 B
PHP
Executable File
<?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 = (int) Tools::getValue('id_category')) {
|
|
global $smarty;
|
|
$smarty->assign('id_category', $id_category);
|
|
return $this->display(__FILE__, 'header.tpl');
|
|
}
|
|
}
|
|
}
|