Zilurex Posted December 16, 2015 Share Posted December 16, 2015 (edited) Hello, I am newbie to Prestashop. I've got displayPromoteTop hook placed in header.tpl. <div class="promoted-top"> <div class="promote-top"> <div class="container"> <div class="row"> {hook h="displayPromoteTop"} </div> </div> </div> It has hooked module PtsStaticContent and it displays properly. I have added this code to be able to hook blocknewsletter to this hook. public function hookDisplayPromoteTop($params) { return $this->hookDisplayPromoteTop($params); } But after all i get this error in console and page is no longer rendered properly. Uncaught ReferenceError: FancyboxI18nClose is not defined global.js(92). If i unhook this module everything is working again. Any ideas? Edited December 16, 2015 by Zilurex (see edit history) Link to comment Share on other sites More sharing options...
yaniv14 Posted December 16, 2015 Share Posted December 16, 2015 When you create public function to display a hook you need to either create some content to that hook or return the content from another hook who has all relevant content. Try to return the left column, like: public function hookDisplayPromoteTop($params) { return $this->hookDisplayLeftColumn($params); } Link to comment Share on other sites More sharing options...
Zilurex Posted December 16, 2015 Author Share Posted December 16, 2015 I've applied your solution and it started to work. Thanks for fast answer : ) 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