benconnekt Posted January 28, 2012 Share Posted January 28, 2012 Hi guys, I'm new to prestashop so if my questions sound silly, please don't get upset. I have three questions to ask. 1) How do I get categories to display on header menu. 2) How do I take off side category menu on home page. 3) How do I display only subcategories of the selected parent category by the side. These are my questions for now. Also if these questions have been asked before and solutions were please send me the links Thanks for you help. 1 Link to comment Share on other sites More sharing options...
CartExpert.net Posted January 30, 2012 Share Posted January 30, 2012 Hello, 1. the category block module needs to be hooked to the header 2. if it is hooked only to the header it will not be displayed at all in the columns 3. use the 'getSubCategories' method of Category class. In your case, if you want only the subcategories to be displayed,you will need to add an exception to block categories, this requires a lot of extra coding to do. Link to comment Share on other sites More sharing options...
jordanzedd Posted February 2, 2012 Share Posted February 2, 2012 Sorry, I don't want to hijack the thread, but you say the module needs to be hooked to the header, so if I accidentally unhook it from the header (which I did), how do I get it back? EDIT: Nevermind, I figured it out. For anyone wonder, go into Modules > Positions and click "Transplant a module," you can also go into the module list and click "Reset" on the module you want to rehook. Link to comment Share on other sites More sharing options...
benconnekt Posted February 5, 2012 Author Share Posted February 5, 2012 Thanks guys I have figured out adding category on header menu but my problems still havent finished. I'm still trying to figure out how to display subcategories of the selected parent category by the side. I have about 10 categories and more than 100 sub categories that drops down . So I want when a category is selected is selected from the menu, all the subcat of that category will display. Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 5, 2012 Share Posted February 5, 2012 Use the 'getSubCategories' method of Category class. Link to comment Share on other sites More sharing options...
benconnekt Posted February 9, 2012 Author Share Posted February 9, 2012 @CartExpert.net, thanks for your reply. Any example will be very very useful as I'm quiet new in prestashop dev. Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 9, 2012 Share Posted February 9, 2012 Hello, You need to create a new instance of the Category class: $category = new Category([CATEGORY_ID], [LANGUAGE_ID]); Then you can get the list of subcategories: $subcategories = $category->getSubCategories([LANGUAGE_ID]) Assign the $subcategories to smarty and process it with {foreach} in the template file. [CATEGORY_ID] = retrieved from URL, eg. Tools::getValue("id_category") [LANGUAGE_ID] = retrieved from cookies, eg. $cookie->id_lang Link to comment Share on other sites More sharing options...
benconnekt Posted February 15, 2012 Author Share Posted February 15, 2012 I can't do it.. do you have a skype or g talk account so we can discuss how much to create this..I need it done ASAP Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 15, 2012 Share Posted February 15, 2012 I can't do it.. do you have a skype or g talk account so we can discuss how much to create this..I need it done ASAP We have sent you a message. Regards. Link to comment Share on other sites More sharing options...
sharad7 Posted February 24, 2012 Share Posted February 24, 2012 I have exactly the same requirement. Can u send me the details too please. Its such a wonderful framework and would like to congratulate presto team. You guys simply rock!!!! 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