azralth Posted July 18, 2013 Share Posted July 18, 2013 Bonjour, pour faire suite à mon précédent post, je viens de réaliser pour les besoin d'un client, un module permettant d'afficher un carrousel des marques. J'ai attribué ce module à un hook que j'ai crée, et tout s'affiche nikel. Malheureusement, le css lui ne se charge pas et je ne comprends pas trop pourquoi. Peut-être auriez-vous une idée ? Je vous donne le code pour y voir plus claire : <?php /** * Manufacturer Slide v1.0 * @author Lk Interactive <[email protected]> **/ if (!defined('_PS_VERSION_')) exit; class manufacturerSlide extends Module { public function __construct() { $this->name = 'manufacturerslide'; $this->tab = 'front_office_features'; $this->version = 1.0; $this->author = 'www.lk-interactive.fr'; $this->ps_versions_compliancy = array('min' => 1.5, 'max' => 1.6); $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('Manufacturer Slide'); $this->description = $this->l('Tiny slide for manufacturer'); $this->confirmUninstall = $this->l ('are you sure you want to uninstall ?'); } public function install() { return (parent::install() && $this->registerHook('contentHomeSlider')); } public function uninstall() { if(!parent::uninstall()) return false; return true; } public function hookContentHomeSlider($params) { $this->smarty->assign(array( 'manufacturers' => Manufacturer::getManufacturers(), 'text_list' => Configuration::get('MANUFACTURER_DISPLAY_TEXT'), 'text_list_nb' => Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB'), 'form_list' => Configuration::get('MANUFACTURER_DISPLAY_FORM'), 'display_link_manufacturer' => Configuration::get('PS_DISPLAY_SUPPLIERS'), )); return $this->display(__FILE__, 'manufacturerslide.tpl'); } public function hookHeader($params) { $this->context->controller->addCSS(($this->_path).'manufacturerslide.css', 'all'); } } ?> Bien évidement, le fichier css se trouve à la racine du dossier de mon module. Merci ! Link to comment Share on other sites More sharing options...
azralth Posted July 18, 2013 Author Share Posted July 18, 2013 Bon c'était stupide, j'avais simplement oublié d'ajouter "$this->registerHook('header')" dans la fonction install, logique que ça ne fonctionne pas du coup. Link to comment Share on other sites More sharing options...
Bondaty and Co Posted July 18, 2013 Share Posted July 18, 2013 Effectivement, j'allais vous répondre avant que vous ne mettiez votre topic en [RESOLU] Link to comment Share on other sites More sharing options...
Bondaty and Co Posted July 18, 2013 Share Posted July 18, 2013 Merci de mettre votre topic en [RESOLU] Link to comment Share on other sites More sharing options...
azralth Posted July 18, 2013 Author Share Posted July 18, 2013 Soit que je ne sais pas ou regarder, soit que je suis stupide, soit que le bouton permattant de passer le post en résolu est bougrement bien planqué, je ne parvient pas à répondre à votre demande 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