amz83 Posted May 20, 2016 Share Posted May 20, 2016 Bonjour je voudrais mettre une image sur macolonne de gauche qui renverrais vers un lien "realisation hammam" je me suis donc dit : " je crée un module de base et dans le tpl je mettrais l'image et le lien". je voudrais que l'image s'affiche sur le coté gauche de mon site j'ai donc mit un hook "Left_colums_blocks". le module s'installe mais n’apparaît nul part. mon site: www.desineo.fr mon module : <?php if (!defined('_PS_VERSION_')) exit; class Calcul extends Module { public function __construct() { $this->name = 'Calcul'; $this->version = '1.0.0'; $this->author = 'Ageron Arthur'; $this->tab = 'front_office_features'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('Calcul'); $this->description = $this->l('réalisation espace hammam'); } public function install() { return (parent::install() && $this->registerHook(' Left_column_blocks')); } public function uninstall() { return parent::uninstall(); } public function hookFooter($params) { $this->context->controller->addCSS($this->_path.'calcul.css', 'all'); $this->context->controller->addJS($this->_path.'calcul.js'); return $this->display(__FILE__, 'calcul.tpl'); } } ?> voila mon php. merci de bien vouloir m'aider =) Link to comment Share on other sites More sharing options...
doekia Posted May 20, 2016 Share Posted May 20, 2016 Peut-etre qu'en créant la fontion hookLeftColumn() ça marcherai mieux et de lire un peu la doc aussi ça pourrait servir. Le hook s'appelle leftColumn ou displayLeftColumn et la fonction qui va avec Link to comment Share on other sites More sharing options...
amz83 Posted May 20, 2016 Author Share Posted May 20, 2016 c'est un ancien screen je suis désolé. Je l'avais déjà modifié mais ça ne marchait toujours pas.En revanche j'ai récupéré un autre module que j'vais deja fait et la ça marche voici le code: { public function __construct() { $this->name = 'hammam'; $this->version = '1.0.0'; $this->author = 'amz83'; $this->tab = 'front_office_features'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('hammam'); $this->description = $this->l('hammam'); } public function install() { return (parent::install() && $this->registerHook('displayLeftColumn')); } public function uninstall() { return parent::uninstall(); } public function hookdisplayLeftColumn($params) { $this->context->controller->addCSS($this->_path.'hammam.css', 'all'); $this->context->controller->addJS($this->_path.'hammam.js'); return $this->display(__FILE__, 'hammam.tpl'); } } ?> 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