bbs Posted May 16, 2018 Share Posted May 16, 2018 Hello, I would like to know how to display a core module on an other page. I want to display the carousel, normally present on home page, in the category page instead replacing content of category.tpl. I have already try, without success, addind a hook, but I'm unable to display anything... Here are some link I have tried to follow without success: nemops.com/how-to-hooks-prestashop-cms/#.Wvr8aSA6-Uk belvg.com/blog/custom-hooks-in-prestashop-1-7.html Anyone can help? Thanks, (PS 1.7) Link to comment Share on other sites More sharing options...
phinq1910 Posted May 17, 2018 Share Posted May 17, 2018 You need use hook of prestashop. Example: hook displayAfterProductThumbs, on your module, you can use following: public function hookDisplayAfterProductThumbs($params) { if (!$this->active) { return false; } // ... do something return $this->display(__FILE__, 'views/templates/front/custom-block.tpl'); } About custom hook, you need add it on template or controller of prestashop Example: {h hook='your-custom-hook'} on template Hope this help Link to comment Share on other sites More sharing options...
bbs Posted May 22, 2018 Author Share Posted May 22, 2018 Thank you, My mistake was not understanding what the "hookDisplay..." must return. It must at least return the HTML code you want to display. 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