nini13 Posted November 15, 2012 Share Posted November 15, 2012 Bonjour à tous et toutes, Je débute dans prestashop et essaye de mettre un hook en place dans la version 1.5 J'ai donc dans mon header.tpl {hook h="MonHook"} Dans le module categories.php function hookMonHook($params) { return $this->hookLeftColumn($params); } et je dois mettre aussi le code pour la création automatique dans la BDD de mon hook ($this->registerHook('MonHook')) Mais où exactement dans le code ci-dessous ????? public function install() { if (!parent::install() || !$this->registerHook('leftColumn') || !$this->registerHook('footer') || !$this->registerHook('header') || // Temporary hooks. Do NOT hook any module on it. Some CRUD hook will replace them as soon as possible. !$this->registerHook('categoryAddition') || !$this->registerHook('categoryUpdate') || !$this->registerHook('categoryDeletion') || !$this->registerHook('actionAdminMetaControllerUpdate_optionsBefore') || !$this->registerHook('actionAdminLanguagesControllerStatusBefore') || !Configuration::updateValue('BLOCK_CATEG_MAX_DEPTH', 4) || !Configuration::updateValue('BLOCK_CATEG_DHTML', 1)) return false; return true; } Après faut il greffer la position du module ? Merci de votre aide. Link to comment Share on other sites More sharing options...
btsconsult Posted November 15, 2012 Share Posted November 15, 2012 Bonjour, Je pense que tu aurais plus de chance de poser ta question dans le forum des Développeurs qui sont habitués à mettre les mains dans le code source : http://www.prestashop.com/forums/forum/120-developpement/ Link to comment Share on other sites More sharing options...
Ninja Of Web Posted November 15, 2012 Share Posted November 15, 2012 Tu aura un exemple dans le zip livrée dans ce topic : http://www.prestashop.com/forums/index.php?/topic/188181-doc-canvas-de-module/ Loic. Link to comment Share on other sites More sharing options...
NewTechno Posted March 19, 2013 Share Posted March 19, 2013 merci 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