amaneuz Posted April 8, 2019 Share Posted April 8, 2019 Hello everyone, I am creating a module, and I would like to add a text inside this block but I do not know how to do it: I do not know if to use a hook, and which one! Thank's! Link to comment Share on other sites More sharing options...
Rolige Posted April 9, 2019 Share Posted April 9, 2019 Hello: You could use displayProductListReviews or displayProductListFunctionalButtons, depends on your Prestashop version. Regards 1 Link to comment Share on other sites More sharing options...
amaneuz Posted April 9, 2019 Author Share Posted April 9, 2019 thank's, i use the 1.7 version. ... public function displayProductListReviews($params) { $this->smarty->assign(array( 'note' => '3.8', 'nbParticipant' => '15245' )); return $this->hookDisplayFooterProduct(); } public function hookDisplayFooterProduct(){ return $this->display(__FILE__, '/views/templates/hook/blockproductminiature.tpl'); } ... and in my tpl file (blockproductminiature.tpl) : La participation est de {$nbParticipant}: La note: {$note}/5 <br/> {debug} but this not work. Link to comment Share on other sites More sharing options...
Rolige Posted April 16, 2019 Share Posted April 16, 2019 You need add the prefix of hook to your function, like this: public function hookDisplayProductListReviews($params) And you need transplant your module to this hook from your install or module positions. 1 Link to comment Share on other sites More sharing options...
amaneuz Posted May 21, 2019 Author Share Posted May 21, 2019 thanks 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