Ririo Posted April 21, 2014 Share Posted April 21, 2014 Hi, I made a custom menu bar in my category.tpl file and i need to assign all categories in a variable which will be enable in my tpl with a foreach. Where can i assign all categories in a smarty var ? Is There already a method who can do that ? (Excuse me for my bad english...) Link to comment Share on other sites More sharing options...
Ririo Posted April 21, 2014 Author Share Posted April 21, 2014 I've resolve my problem Link to comment Share on other sites More sharing options...
vekia Posted April 21, 2014 Share Posted April 21, 2014 may i know how you did that? i think that this will be useful for other merchants with similar question Link to comment Share on other sites More sharing options...
Ririo Posted April 22, 2014 Author Share Posted April 22, 2014 may i know how you did that? i think that this will be useful for other merchants with similar question Yup I just assign all categories to a variable with this function : $categories = Category::getHomeCategories($this->context->cookie->id_lang, false); Here, i put false on my second parameter to take ALL categories, even thoses which are disabled and in my tpl i'm just making them gray in my loop if they are disabled. 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