bedigital Posted August 17, 2017 Share Posted August 17, 2017 I want to create a new HOOK or display the homefeatured module at the bottom of the categories page. Link to comment Share on other sites More sharing options...
BonPresta Posted August 18, 2017 Share Posted August 18, 2017 I want to create a new HOOK or display the homefeatured module at the bottom of the categories page. In the file homefeatured.php In the function install You need to register a hook for example - displayCategoryFeatured public function install() { $this->_clearCache('*'); Configuration::updateValue('HOME_FEATURED_NBR', 8); Configuration::updateValue('HOME_FEATURED_CAT', (int)Context::getContext()->shop->getCategory()); Configuration::updateValue('HOME_FEATURED_RANDOMIZE', false); if (!parent::install() || !$this->registerHook('header') || !$this->registerHook('addproduct') || !$this->registerHook('updateproduct') || !$this->registerHook('deleteproduct') || !$this->registerHook('categoryUpdate') || !$this->registerHook('displayHomeTab') || !$this->registerHook('displayCategoryFeatured') || !$this->registerHook('displayHomeTabContent') ) return false; return true; } Then in the same file add new function public function hookDisplayCategoryFeatured() { return $this->hookDisplayHome(); } Then you need to reinstall the module And add the hook to the category.tpl theme file {hook h='displayCategoryFeatured'} Link to comment Share on other sites More sharing options...
bedigital Posted August 18, 2017 Author Share Posted August 18, 2017 Many thanks, it worked! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now