jd440 Posted June 17, 2013 Share Posted June 17, 2013 (edited) Boujour à tous. Voilà je developpe un module que je fixe sur un hook que j'ai créer et qui s'accroche sur le template {category.tpl} Dans ce module je souhaiterais récupérer le nom de la category courante. j'ai essayer $this->context->controller->category mais j'ai l'erreur: Cannot access protected property CategoryController::$category Comment puis je récupérer la valeur? Merci Edited June 17, 2013 by jd440 (see edit history) Link to comment Share on other sites More sharing options...
jd440 Posted June 17, 2013 Author Share Posted June 17, 2013 j'ai trouvé cela: $category= new Category(Tools::getValue('id_category')); $category_name = $category->getName(); Si quelqu'un as mieux. Link to comment Share on other sites More sharing options...
phil56 Posted June 19, 2013 Share Posted June 19, 2013 Sur le forum anglophone, une idée simple qui peut être développée : Hey Everybody! I just added a small tut on adding page-speficic behaviors from within a module's hook (like showing it on selected pages only, without messing with exceptions) http://nemops.com/pa...stashop-module/ Cheers! Fabio Cordialement, Phil, 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