n0wis Posted October 12, 2013 Share Posted October 12, 2013 (edited) Bonjour à tous ! Je développe mon premier site e-commerce avec Prestashop et je suis confronté à un soucis au niveau de l'ajout d'un nouveau Hook. J'aimerais pouvoir "accrocher" le module par défaut "Carrousel d'images" autre part que sur les Hook par défaut. J'ai donc suivi un tutoriel pour créer mon nouveau Hook. Dans le fichier header.php, j'ai ajouté mon Hook : {hook h='displaybeforContent'} <div id="columns" class="alpha omega clearfix centercolum"> Puis, dans le fichier homeslider.php qui se trouve dans le dossier homeslider : if (parent::install() && $this->registerHook('displayHome') && $this->registerHook('displayBeforContent') && $this->registerHook('actionShopDataDuplication')) { ... } public function hookdisplayBeforContent() { if(!$this->_prepareHook()) return; // Check if not a mobile theme if ($this->context->getMobileDevice() != false) return false; $this->context->controller->addJS($this->_path.'js/jquery.bxSlider.min.js'); $this->context->controller->addCSS($this->_path.'bx_styles.css'); $this->context->controller->addJS($this->_path.'js/homeslider.js'); return $this->display(__FILE__, 'homeslider.tpl', $this->getCacheId()); } Mon Hook n'apparaît pas dans la liste des Hook. Un petit coup de main ? Edited October 12, 2013 by n0wis (see edit history) 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