Tepster Posted August 3, 2013 Share Posted August 3, 2013 Hello, I am sorry for my bad English. I don't speak English. In the menu I have the items, after click on them, subitems of this item will display. I need a code, which sets, which submenu will be display or not. After page refresh, I think, the URL determines, which menu will be display and which not - is it true? Please, help me. I hope, you understand me. Thank you Link to comment Share on other sites More sharing options...
stottycabanas Posted August 3, 2013 Share Posted August 3, 2013 If I've understood the query correctly, in the back office you need to select Modules then Top Horizontal Menu then Configure. You can specify there which categories you want to appear in the menu. Make sure you enter them in the desired order, as there is no easy way to reorder the categories except to remove them and start again. The subcategories that appear below each category will be those you have set as 'Displayed' via Catalog/Categories. Link to comment Share on other sites More sharing options...
vekia Posted August 3, 2013 Share Posted August 3, 2013 it is worth to say that top horizontal menu displays subcategories of the category. if you don't want to display subcategories - you have to add last category in the category tree, there is no other way of course some modification of the code will do the trick - but in this case it is necessary to know something about php /smarty Link to comment Share on other sites More sharing options...
Tepster Posted August 3, 2013 Author Share Posted August 3, 2013 Sorry I don't understand you... But I think, you don't understand me too. I only want the javascript code, which decides, which subcategories will be displayed and which not. I want to display all menu with all categories, but every items is under every other items. For example: I have menu with items - "colors", "food", "computer". When I click to "colors", the subcategories for "colors" ("white", "brown", "blue"...) will displayed. Now I refresh a page and the subcategories for "colors" is still displayed. So I need the code, which say "the subcategories for 'colors' will be displayed". Link to comment Share on other sites More sharing options...
vekia Posted August 3, 2013 Share Posted August 3, 2013 for the first please tell us what horizontal menu you're using im just wondering which one because you said that you have to "click" on the category (by default, in prestashop default module you don't have to click on it) Link to comment Share on other sites More sharing options...
Tepster Posted August 3, 2013 Author Share Posted August 3, 2013 URL of the web: http://www.zaruceneceske.cz/presta/ It is the menu on left. First item is "Židle & křesla". When I click to first item, all subcategories will open, but it is wrong. Link to comment Share on other sites More sharing options...
vekia Posted August 3, 2013 Share Posted August 3, 2013 it's a huge modification of the prestashop, so everything depends on the PHP sources. Unfortuately we don't know them, so it will be really hard to help. You said that you want to use javascript - yes it is possbile, but everything depends on the php sources. Link to comment Share on other sites More sharing options...
Tepster Posted August 3, 2013 Author Share Posted August 3, 2013 (edited) When I display some subcategories by click on the item of some category and then I refresh page, the PrestaShop must know, what subcategories will be displayed. I think, it is determine by some part of URL - is it true? Edited August 3, 2013 by Tepster (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 3, 2013 Share Posted August 3, 2013 yes, but sometimes it isn't visible (especially friendly url) id of the selected category is a part of URL, you can get category id with this code: {Tools::getValue('id_category')} - in template file Tools::getValue('id_category) - in the php file $_GET['id_category'] - in the php file Link to comment Share on other sites More sharing options...
lovi222 Posted August 31, 2013 Share Posted August 31, 2013 Hi, I am facing one problem can anyone plz help me in resolving this can we make expandable like we have in menu of categories in categories block i don't want to shop my items in category block it should unexpanded first Link to comment Share on other sites More sharing options...
vekia Posted August 31, 2013 Share Posted August 31, 2013 so you want to display all categories ? not only main categories? Link to comment Share on other sites More sharing options...
lovi222 Posted September 2, 2013 Share Posted September 2, 2013 Hi Vekia, i want to display all categories first and on header of categories i want - sign on click of that all should unexpanded and + sign appears same as for subcategories. Link to comment Share on other sites More sharing options...
Recommended Posts