bellonix Posted September 26, 2017 Share Posted September 26, 2017 Bonjour à tous, Voila j'aimerais ajouter un fichier javascript dans mon hook displayAdminProductExtra. J'ai crée un onglet sur l'administration de fiche produit Dans cet onglet, j'affiche un tableau de pictogrammes et j'aimerais que lorsqu'on clique sur un pictogramme il s'enregistre dans un table qui lie le pictogramme au produit en question. En gros un pictogramme peut s'afficher sur plusieurs fiches produit différentes. Mais pour l'instant je n'arrive pas a ajouter mon fichier javascript voici mon code d'ajout: public function hookDisplayAdminProductsExtra($params) { return $this->display(__FILE__, '/views/template/hook/blockexpedition.tpl'); $this->context->controller->registerJavascript('blockexpedition','modules/'.$this->name.'js/blockexpedition.js'); } Merci d'avance pour votre aide. Link to comment Share on other sites More sharing options...
bellonix Posted September 27, 2017 Author Share Posted September 27, 2017 J'ai résolu mon problème en appelant mon fichier javascript dans le hook actionAdminControllerSetMedia prévu à cet effet je mets mon code pour ceux qui aura le même problème voici mon code: public function hookActionAdminControllerSetMedia(){ $this->context->controller->addJS($this->_path.'js/blockexpedition.js'); } bonne continuation à tous 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