RudraTandav Posted May 28, 2013 Share Posted May 28, 2013 i want to edit html file of top menu how can i do that plz see the image Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted May 28, 2013 Share Posted May 28, 2013 Hi, what module do you use for top menu? Regards Link to comment Share on other sites More sharing options...
RudraTandav Posted May 28, 2013 Author Share Posted May 28, 2013 (edited) default one top horizontal menu actualy i want to make it look like megamenu Edited May 28, 2013 by anilm661 (see edit history) Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted May 28, 2013 Share Posted May 28, 2013 The simplest way is buy one of this modules: http://addons.prestashop.com/ru/front-office-features/4556-rich-menu.html http://addons.prestashop.com/ru/front-office-features/6386-drop-down-menu.html Link to comment Share on other sites More sharing options...
RudraTandav Posted May 28, 2013 Author Share Posted May 28, 2013 kool but is thr any way to edit the html file of top menu Link to comment Share on other sites More sharing options...
vekia Posted May 28, 2013 Share Posted May 28, 2013 you can add own html to the menu by editing template (.tpl) files of top horizontal menu Link to comment Share on other sites More sharing options...
RudraTandav Posted May 28, 2013 Author Share Posted May 28, 2013 where can i find tpl file of top horizontal menu Link to comment Share on other sites More sharing options...
vekia Posted May 28, 2013 Share Posted May 28, 2013 modules/blocktopmenu/blocktopmenu.tpl or if exist: themes/yourtheme/blocktopmenu/blocktopmenu.tpl Link to comment Share on other sites More sharing options...
Kogkalidis Posted June 5, 2013 Share Posted June 5, 2013 The simplest way is buy one of this modules: http://addons.presta...-rich-menu.html http://addons.presta...-down-menu.html If we need to buy one we know where to find it!! If you don't want to help us, don't make marketing!! One of the biggest DISLIKE of my entire life!! :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: 1 Link to comment Share on other sites More sharing options...
Kogkalidis Posted June 5, 2013 Share Posted June 5, 2013 modules/blocktopmenu/blocktopmenu.tpl or if exist: themes/yourtheme/blocktopmenu/blocktopmenu.tpl Vekia, I saw in some posts about the horizontal menu that tpl makes the job, but I tried to find out (deleting the content of tpl) and nothing happened.. everything works properly.. i think they hide the html coding inside some php file or worse inside js.... Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted June 5, 2013 Share Posted June 5, 2013 Vekia, I saw in some posts about the horizontal menu that tpl makes the job, but I tried to find out (deleting the content of tpl) and nothing happened.. everything works properly.. i think they hide the html coding inside some php file or worse inside js.... in this files you can find the {$MENU} value, that contains html. It is assign here: blocktopmenu.php -> hookDisplayTop() If we need to buy one we know where to find it!! If you don't want to help us, don't make marketing!! One of the biggest DISLIKE of my entire life!! :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: I didn't do any marketing, but this modules will save a lot of time for you or any other man. If you don't have money to buy one of this modules, community is not want know about it. Your dislike you can post with personal message for me. Link to comment Share on other sites More sharing options...
vekia Posted June 5, 2013 Share Posted June 5, 2013 peace guys so, what is the main case in this thread now? 1 Link to comment Share on other sites More sharing options...
Kogkalidis Posted June 5, 2013 Share Posted June 5, 2013 peace guys so, what is the main case in this thread now? I need a way to put ids in top horizontal menu elements in order to edit them separately in css.. i want to make the module look like the menu on this site www.e-shop.gr or whatever is your suggestion in order to have as closer result to this as possible! Thanx again my prestas-icon!! Link to comment Share on other sites More sharing options...
vekia Posted June 5, 2013 Share Posted June 5, 2013 by default, unfortunately, elements in top horizontal menu haven't got own classes / id to achieve this you have to edit core of the module. i will show you how to achieve this on example of the CMS link. i the code you've got: case 'CMS_CAT': $category = new CMSCategory((int)$id, (int)$id_lang); if (count($category)) { $this->_menu .= '<li><a href="'.$category->getLink().'">'.$category->name.'</a>'; $this->getCMSMenuItems($category->id); $this->_menu .= '</li>'.PHP_EOL; } break; you need to include id to the <li> element: $this->_menu .= '<li><a href="'.$category->getLink().'" id="cms_menu_item_'.$id.'">'.$category->name.'</a>'; then main menu elements related to the CMS pages will have got own id: cms_menu_item_$id where the $id is ID number of the CMS page / category unfortunately, if you want to achieve this for other elements (like categories of products) you have to modify code related to it (you will see the code in the source, just use the same method as I used for cms pages) let me know if you've got questions 2 Link to comment Share on other sites More sharing options...
Kogkalidis Posted June 5, 2013 Share Posted June 5, 2013 by default, unfortunately, elements in top horizontal menu haven't got own classes / id to achieve this you have to edit core of the module. i will show you how to achieve this on example of the CMS link. i the code you've got: case 'CMS_CAT': $category = new CMSCategory((int)$id, (int)$id_lang); if (count($category)) { $this->_menu .= '<li><a href="'.$category->getLink().'">'.$category->name.'</a>'; $this->getCMSMenuItems($category->id); $this->_menu .= '</li>'.PHP_EOL; } break; you need to include id to the <li> element: $this->_menu .= '<li><a href="'.$category->getLink().'" id="cms_menu_item_'.$id.'">'.$category->name.'</a>'; then main menu elements related to the CMS pages will have got own id: cms_menu_item_$id where the $id is ID number of the CMS page / category unfortunately, if you want to achieve this for other elements (like categories of products) you have to modify code related to it (you will see the code in the source, just use the same method as I used for cms pages) let me know if you've got questions Thank you for the guidelines.. For now I put a totally custom menu.. I deleted everything inside of blocktopmenu.tpl (i left only the outer div) and I want to make it the easy way ** for now the e-shop is closed.. if you want to check it out.. send me pm your ip to put it inside Link to comment Share on other sites More sharing options...
vekia Posted June 5, 2013 Share Posted June 5, 2013 sure, i want to check it check your message box :-) Link to comment Share on other sites More sharing options...
mowax Posted July 24, 2013 Share Posted July 24, 2013 How can I add a 'contact' tab which links to the contact form? I can't select it from the list of pages or create a new link. The 'Add Top Menu Link' doesn't work for me. Thanks for any ideas Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2013 Share Posted July 24, 2013 why doesnt it work? can you explain this a bit more? you've got some error code or what? Link to comment Share on other sites More sharing options...
mowax Posted July 24, 2013 Share Posted July 24, 2013 Hi Vekia, In Modules > Top Horizontal Menu > Configure, you can only select CMS pages, manufacturers, suppliers etc. You can't select the contact form from the list because it is none of the above. I'm talking about themes/contact-form.php. So I try to add a link in the section below, where is says 'Add Top Menu Link', but this doesn't work. When I try to save it it says 'Link successfully added', but the link doesn't appear anywhere. Link to comment Share on other sites More sharing options...
onno1000 Posted November 12, 2013 Share Posted November 12, 2013 After adding new link you can find it in the bottom of the left list and you can add it to the right list like the others Link to comment Share on other sites More sharing options...
vekia Posted November 13, 2013 Share Posted November 13, 2013 After adding new link you can find it in the bottom of the left list and you can add it to the right list like the others hello you've got this issue? Link to comment Share on other sites More sharing options...
basuko_2000 Posted November 13, 2013 Share Posted November 13, 2013 Thank!!!! by default, unfortunately, elements in top horizontal menu haven't got own classes / idto achieve this you have to edit core of the module.i will show you how to achieve this on example of the CMS link.i the code you've got: case 'CMS_CAT': $category = new CMSCategory((int)$id, (int)$id_lang); if (count($category)) { $this->_menu .= '<li><a href="'.$category->getLink().'">'.$category->name.'</a>'; $this->getCMSMenuItems($category->id); $this->_menu .= '</li>'.PHP_EOL; } break; you need to include id to the <li> element: $this->_menu .= '<li><a href="'.$category->getLink().'" id="cms_menu_item_'.$id.'">'.$category->name.'</a>'; then main menu elements related to the CMS pages will have got own id: cms_menu_item_$id where the $id is ID number of the CMS page / categoryunfortunately, if you want to achieve this for other elements (like categories of products) you have to modify code related to it (you will see the code in the source, just use the same method as I used for cms pages)let me know if you've got questions Link to comment Share on other sites More sharing options...
onno1000 Posted November 13, 2013 Share Posted November 13, 2013 hello you've got this issue? No I just gave the solution to user: mowax to his question 1 Link to comment Share on other sites More sharing options...
vekia Posted November 13, 2013 Share Posted November 13, 2013 No I just gave the solution to user: mowax to his question thank you and im sorry for confusion Link to comment Share on other sites More sharing options...
mowax Posted November 16, 2013 Share Posted November 16, 2013 my problem was the module itself, it just needed resetting, then I could add the link. Link to comment Share on other sites More sharing options...
scatty Posted June 13, 2014 Share Posted June 13, 2014 Don't you somebody know how to do this in Prestashop 1.6? I did it like It is described here but it doesn't work Link to comment Share on other sites More sharing options...
vekia Posted June 14, 2014 Share Posted June 14, 2014 what file you changed exactly? Link to comment Share on other sites More sharing options...
scatty Posted June 14, 2014 Share Posted June 14, 2014 I changed blocktopmenu.php file. I moved one step farther, just now I have classes assigned to case PRD, CMS and CMS_CAT and I did it like it is described here. But what I actually need is to assign class to case CAT, but code looks like this: case 'CAT': ($this->_menu .= $this->generateCategoriesMenu(Category::getNestedCategories($id, $id_lang, true, $this->user_groups))) ; break; and I don't know how to do it. Link to comment Share on other sites More sharing options...
Recommended Posts