stickattack Posted November 28, 2018 Share Posted November 28, 2018 Hi everyone, I started in Prestashop development for a few days. I try for a few hours to graft a simple template on the displayCustomization hook. To do this here is what I did: 1 / Recording the hook in the installation method $this->registerHook('displayCustomization') 2 / Definition of the display method in the main file of my module public function hookDisplayCustomization($params){ return $this->display(__FILE__, 'custom.tpl'); } 3 / Creating the template file in modules \ mymodule \ views \ templates \ hook \ custom.tpl <!-- Block custom --> <div id="mymodule_block_custom" class="block"> <div class="block_content"> <p> hello world </p> </div> </div> <!-- /Block custom --> Unfortunately, when I go on a product page with the customization enabled nothing is displayed ... Besides, should it be activated? Of course I tried to reinstall the module, reset it etc. Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted November 29, 2018 Share Posted November 29, 2018 Hi... try to clear cache and Template compilation to Force compilation tour admin.i hope that is help for you/ Goto admin->Advanced Parameters->Performance Thanks Link to comment Share on other sites More sharing options...
stickattack Posted November 29, 2018 Author Share Posted November 29, 2018 Hi Nishith , thank you for this response. Its already the case. Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted November 29, 2018 Share Posted November 29, 2018 Hi... I thing the problem of your path file display try this. public function hookDisplayCustomization($params){ return $this->display(__FILE__, 'custom.tpl'); } TO public function hookDisplayCustomization($params){ return $this->context->smarty->fetch($this->local_path . 'views/templates/hook/custom.tpl'); //path of your template file } Thanks Link to comment Share on other sites More sharing options...
stickattack Posted November 29, 2018 Author Share Posted November 29, 2018 same problem .. 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