Jatin51 Posted September 14, 2014 Share Posted September 14, 2014 (edited) We are creating a custom module, WE created a custom hook "customPackage" in it. We need to put that hook inside the product page without changing the prestashop default product page .tpl file. Need to know how can we execute that hook on product page from our custom module. We First register hook using : $this->registerHook('customPackage'); Then we create function : public function hookCustomPackage($params){ ....... } In product.tpl of theme we execute hook using : <div id='myCustomHook'> {hook::exec('customPackage')} </div> But we want to execute hook on product.tpl without write above line in product.tpl. Please help to execute this hook from our custom module. Thank you, Edited September 14, 2014 by Jatin51 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted October 1, 2014 Share Posted October 1, 2014 you can spawn your new hook from other hook (but it will appear in default hook) for example: hook function displayProductFooter($params){ return $this->hookCustomPackage($params); } then associate your module with productFooter hook. 1 Link to comment Share on other sites More sharing options...
Jatin51 Posted October 2, 2014 Author Share Posted October 2, 2014 Thank You Link to comment Share on other sites More sharing options...
Recommended Posts