Fruitcake_Gary Posted September 4 Share Posted September 4 As in the title. I would like to add a separate template for products to the left column, the one with filters, products on promotion. I edited ps_specials.php adding public function hookDisplayLeftColumn($params) { $this->_clearCache('*'); $this->templateFile = 'module:ps_specials/views/templates/hook/ps_specials_left.tpl'; } public function install() { $this->_clearCache('*'); Configuration::updateValue('BLOCKSPECIALS_SPECIALS_NBR', 8); return parent::install() && $this->registerHook('actionProductAdd') && $this->registerHook('actionProductUpdate') && $this->registerHook('actionProductDelete') && $this->registerHook('actionObjectSpecificPriceCoreDeleteAfter') && $this->registerHook('actionObjectSpecificPriceCoreAddAfter') && $this->registerHook('actionObjectSpecificPriceCoreUpdateAfter') && $this->registerHook('displayHome') && $this->registerHook('hookDisplayLeftColumn'); } However, this did not help, I also tried to edit the hooks in the admin panel, but still nothing I also created an additional .tpl template to reflect the view on the left side, differently styled Link to comment Share on other sites More sharing options...
Prestashop Addict Posted September 4 Share Posted September 4 Did you uninstall/install module to register new hook? Link to comment Share on other sites More sharing options...
Fruitcake_Gary Posted September 4 Author Share Posted September 4 @Prestashop Addict Hi. Thanks for your interest in the topic Yes. I also added another item to the 'Install' function public function install() { $this->_clearCache('*'); Configuration::updateValue('BLOCKSPECIALS_SPECIALS_NBR', 8); return parent::install() && $this->registerHook('actionProductAdd') && $this->registerHook('actionProductUpdate') && $this->registerHook('actionProductDelete') && $this->registerHook('actionObjectSpecificPriceCoreDeleteAfter') && $this->registerHook('actionObjectSpecificPriceCoreAddAfter') && $this->registerHook('actionObjectSpecificPriceCoreUpdateAfter') && $this->registerHook('displayHome') && $this->registerHook('displayLeftColumn'); // <- new one } However, still these views do not appear Link to comment Share on other sites More sharing options...
Prestashop Addict Posted September 5 Share Posted September 5 But in your hook function I don't see any smarty variables used by the template! 1 Link to comment Share on other sites More sharing options...
Fruitcake_Gary Posted September 6 Author Share Posted September 6 Thank you, that's where the problem lay. I added passing $products to the template and 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