tozi Posted January 11, 2015 Share Posted January 11, 2015 (edited) Hi all, i have prestashop 1.5.6.1. I need in cms page module block newsletter. My method didnt work... 1. create new cms page with id 16 2. adding this to module blocknewsletter function hookDisplayMyNewHook() { return $this->leftColumn($params, 'hookDisplayMyNewHook'); return $this->display(__FILE__, 'blocknewsletter.tpl'); } 3. add to cms.tpl <h1>{$cms->meta_title}</h1> {if $cms->id == 16} {hook h='displayMyNewHook'} {/if} But if i tried hook this module then i have the error This module can not be connected to this Hook. Where I have an error? Please help. Edited January 11, 2015 by tozi (see edit history) Link to comment Share on other sites More sharing options...
Richard S Posted January 11, 2015 Share Posted January 11, 2015 You have added to return sentences in one functions. Only the first one is executed. Link to comment Share on other sites More sharing options...
tozi Posted January 11, 2015 Author Share Posted January 11, 2015 You can by more specific. I also tried this function hookDisplayMyNewHook() { return $this->leftColumn('hookDisplayMyNewHook'); } Link to comment Share on other sites More sharing options...
tozi Posted January 11, 2015 Author Share Posted January 11, 2015 (edited) Ok solved i only change this public function hookDisplayLeftColumn($params) { $this->_prepareHook($params); return $this->display(__FILE__, 'blocknewsletter.tpl'); } to this public function hookDisplayMyNewHook($params) { $this->_prepareHook($params); return $this->display(__FILE__, 'blocknewsletter.tpl'); } And install module. Edited January 11, 2015 by tozi (see edit history) 1 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