aymeric69001 Posted March 14, 2018 Share Posted March 14, 2018 (edited) Hello, I created a module that works correctly on my localhost, but when I install on the client server (same version of Presta => 1.7), the hook "DisplayWrapperTop" does not work (i.e when I return a .tpl file in it or if I echo something nothing shows up). I am looking for a way to debug this situation, or if you have the solution it would be even better. In the code below, just "hookDisplayFooter" shows up: <?php if (!defined('_PS_VERSION_')) exit; class TheModule extends Module { function __construct() { $this->name = 'themodule'; $this->tab = 'front_office_features'; $this->version = '1.0'; $this->author = 'My Name'; $this->need_instance = 0; $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('Le module test'); $this->description = $this->l('Juste un essai'); $this->confirmUninstall = $this->l('Are you sure you want to do it?'); } public function install() { if (!parent::install() OR !$this->registerHook('WrapperTop') OR !$this->registerHook('Footer') ) return false; return true; } public function uninstall() { if (!parent::uninstall() ) return false; return true; } public function hookDisplayFooter($params) { print_r("hookDisplayFooter"); } public function hookDisplayWrapperTop($params) { print_r("hookDisplayWrapperTop"); } } Thanks p.s.: "I checked in the Design > positions, and my module is the only one present in displayWrapperTop Edited March 14, 2018 by aymeric69001 (see edit history) Link to comment Share on other sites More sharing options...
pabloMarch Posted April 7, 2018 Share Posted April 7, 2018 Switch to another theme and them go back to yours, the hook should be there if you see in "Transplant a module" 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