Afshin Posted September 20, 2010 Share Posted September 20, 2010 hi . I want to show categories like dropdown box in prestashop module or template frontend ..I used this code but it doesn't work correctly . echo ' '.$this->l('Select category:').' '; $categories = Category::getCategories(intval($cookie->id_lang), false); Category::recurseCategory($categories, $categories[0][1], 1, ($this->getFieldValue($obj, 'id_category_default') ? $this->getFieldValue($obj, 'id_category_default') : Tools::getValue('id_category', 1))); echo ' how can I do this ?thanks Link to comment Share on other sites More sharing options...
Afshin Posted September 21, 2010 Author Share Posted September 21, 2010 anybody don't know ? i want show prestashop categories in backend module , like product backend page ... adminproduct .. select between categories with select box .. ... but only i can show subcategories of home category .. not all of subcategories l. help me please Link to comment Share on other sites More sharing options...
Afshin Posted September 21, 2010 Author Share Posted September 21, 2010 hi , I also check this : $depth = 1; // when depth =1 it works /* Construct categories tree */ $categTree = Category::getRootCategory()->recurseLiteCategTree(intval($depth)); when $depth =1; it works but it does not work when depth is more than 1 . why ? how can I get all categories and sub categories ? Link to comment Share on other sites More sharing options...
Afshin Posted May 29, 2011 Author Share Posted May 29, 2011 I still have this problem ! 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