srjacob Posted November 14, 2013 Share Posted November 14, 2013 Is is possible to create drop down menus for the top menu block? If so, how? Thanks in advance. Steve Link to comment Share on other sites More sharing options...
Paulito Posted November 14, 2013 Share Posted November 14, 2013 Good morning Assuming you are using PS default theme then this happens naturally when you add a "child" to a "parent" category If you have a Category "Pet" http://screencast.com/t/Dq1IK6WAh Create child categories http://screencast.com/t/GwR1z9PCeYX Goto: Back office > Modules > Module > Top horizontal Menu > Configure http://screencast.com/t/dMo8fo7AX Result http://screencast.com/t/CLDzoxgn Hope this helps Paul 1 Link to comment Share on other sites More sharing options...
vekia Posted November 14, 2013 Share Posted November 14, 2013 hello you want to create menus lie Paulito mentioned above? if not, can you please explain? maybe you want to create totally different drop down for some custom links? Link to comment Share on other sites More sharing options...
srjacob Posted November 14, 2013 Author Share Posted November 14, 2013 Thanks for your help. I don't want to create submenus based on categories. I want to create drop down lists for custom topics that will link to different pages. For example, Topic 1 Topic 1.1 Topic 1.2 When topic 1 on the top bar is moused over, I would like Topic 1.1 and 1.2 to drop down (like I can do with Dreamweaver with Spry assets). Steve Link to comment Share on other sites More sharing options...
Paulito Posted November 14, 2013 Share Posted November 14, 2013 Good morning Just do the same with CMS pages http://screencast.com/t/YWltvUnSUp or am I barking up the wrong tree Paul Link to comment Share on other sites More sharing options...
srjacob Posted November 15, 2013 Author Share Posted November 15, 2013 That's what I would like to do. How did you do that? Link to comment Share on other sites More sharing options...
vekia Posted November 15, 2013 Share Posted November 15, 2013 Paulito, you created CMS pages or these links are "custom links" ? Link to comment Share on other sites More sharing options...
Paulito Posted November 15, 2013 Share Posted November 15, 2013 Good morning Milos Using PS 1.5.5 default theme These are CMS pages I am struggling a bit and it would be easier for you to see if you go to HERE and click on Topics I cannot get the First Child to link but the Second one does Anyway, have a look Paul Link to comment Share on other sites More sharing options...
vekia Posted November 15, 2013 Share Posted November 15, 2013 So i suppose that author of this topic wants to display external urls just waiting for confirmation, will see Link to comment Share on other sites More sharing options...
srjacob Posted November 15, 2013 Author Share Posted November 15, 2013 Thank you. That is precisely what I want to do. It would be nice, however, to have the external urls display within the Prestashop framework. I can easly create the external pages with Dreamweaver. Steve Link to comment Share on other sites More sharing options...
vekia Posted November 15, 2013 Share Posted November 15, 2013 hello top menu module has got feature to add external links. just open module configuration page, and scroll page down you can add any external url you want with this tool Link to comment Share on other sites More sharing options...
srjacob Posted November 16, 2013 Author Share Posted November 16, 2013 Yes, I know that. What I would like to know is how to do drop down submenus on the top menu, each with there own links. Alternatively, I would like to know how to add parent CMS categories, which would probably satisfy my needs. Some of the other posters show what I am looking for, they just don't show how they did it. Steve Link to comment Share on other sites More sharing options...
vekia Posted November 16, 2013 Share Posted November 16, 2013 go to preferences > CMS click on "add new" in CMS Categories block: i created My Test Category: in the third step - add new pages to your category. i created 3 sample pages: then back to the modules > top horizontal menu > configuration page 1) YOu will see new category on list "My Test Category" - select it (left hand side block) 2) click on ADD >> button 3) you will see CMS Category ("My Test Category") in the right hand side block 4) hit save effects in front office: 1) select 1 Link to comment Share on other sites More sharing options...
srjacob Posted November 17, 2013 Author Share Posted November 17, 2013 Thank you so much. That solves my problem. Steve Link to comment Share on other sites More sharing options...
vekia Posted November 17, 2013 Share Posted November 17, 2013 you're welcome glad to hear that Paulito an me helped you a little in this case i can go ahead and mark this topic as solved now with regards, Milos Link to comment Share on other sites More sharing options...
joaofilipe Posted December 6, 2013 Share Posted December 6, 2013 Hi guys, about vekia's post #13; how can you give the url you want to those links? In my case i want to link to existent pages from manufactures. thanks joaofilipe Link to comment Share on other sites More sharing options...
vekia Posted December 6, 2013 Share Posted December 6, 2013 hello there is an option to select manufacturer: this is what you're looking for? Link to comment Share on other sites More sharing options...
joaofilipe Posted December 6, 2013 Share Posted December 6, 2013 Hi vekia, i can´t select the one in bold (Manufacturer)that should make a drop down menu with all manufacturers. Also i don´t have an All manufacturers... in that list... And if you want to add links to the menu, on the add a link to top menu, it seams that you can´t make drop down , just independent... thanks Link to comment Share on other sites More sharing options...
vekia Posted December 6, 2013 Share Posted December 6, 2013 what module version you've got? everything depends on it Link to comment Share on other sites More sharing options...
joaofilipe Posted December 6, 2013 Share Posted December 6, 2013 i´m on presta 1.5.3.1 and the module version is 1.5 Link to comment Share on other sites More sharing options...
vekia Posted December 6, 2013 Share Posted December 6, 2013 try with latest version of this module (1.7) you can download it from github: https://github.com/PrestaShop/PrestaShop/tree/1.6/modules/blocktopmenu Link to comment Share on other sites More sharing options...
joaofilipe Posted December 6, 2013 Share Posted December 6, 2013 this is embarrassing ... how do i download it? at right side history i see a < > but when i click it and see the download zip i only get presta 1.6 and not the module... thanks Link to comment Share on other sites More sharing options...
vekia Posted December 6, 2013 Share Posted December 6, 2013 here it is: blocktopmenu.zip 1 Link to comment Share on other sites More sharing options...
joaofilipe Posted December 6, 2013 Share Posted December 6, 2013 vekia i´d rather learn how to download it but thanks a bunch Link to comment Share on other sites More sharing options...
vekia Posted December 6, 2013 Share Posted December 6, 2013 if you want to download files from github you have to download whole library, unpack it, got ot modules and grab blocktopmenu directory 1 Link to comment Share on other sites More sharing options...
joaofilipe Posted December 6, 2013 Share Posted December 6, 2013 I thought of that but i was not sure and afraid of doing something wrong! Thanks for your time and patience vekia! I made the update to version 1.7 and All Manufacturers indeed shows, but after i save and go to FO my shop was gone... Another thing... where can i change the name from All Manufacturers to whatever i want? Link to comment Share on other sites More sharing options...
vekia Posted December 6, 2013 Share Posted December 6, 2013 what you see instead of shop? white page? if so, please turn on error reporting, will see then where the problem is Link to comment Share on other sites More sharing options...
joaofilipe Posted December 6, 2013 Share Posted December 6, 2013 (edited) here´s the error... Edited December 15, 2013 by joaofilipe (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted December 6, 2013 Share Posted December 6, 2013 ahh you use 1.5.3 there is no cache support for modules. can you try with this file: http://pastebin.com/sk2RmBJg it's a blocktopmenu.php - copy it to module directory (overwrite original file) 1 Link to comment Share on other sites More sharing options...
joaofilipe Posted December 6, 2013 Share Posted December 6, 2013 Thanks again vekia, working now. I just have to find where i can align the menu to left because it run away to right! Do you know where can i change the name All manufacturers to any i want? Link to comment Share on other sites More sharing options...
vekia Posted December 6, 2013 Share Posted December 6, 2013 thank you for information you can change it under localization > translations tab in your back office from dropdown select "installed modules translations" then select theme, and press flag translate any thing you want (it works also if you want to change text in english - just press US flag) Link to comment Share on other sites More sharing options...
joaofilipe Posted December 7, 2013 Share Posted December 7, 2013 thanks a lot for your help vekia the All manufacturers stays as link to manufacturers that leads to an "ugly" empty page where we are supposed to have manufacturers. i mean i wish that the All manufactures was not a link as in drop down menu from manufactures left column but only the drop down menu items that follow. many hosters don´t allow max_input_var greater than 1000 so i was looking for original file on post #30 Link to comment Share on other sites More sharing options...
vekia Posted December 7, 2013 Share Posted December 7, 2013 blocktopmenu.php line 569 $this->_menu .= '<li><a href="'.$link->getPageLink('manufacturer').'">'.$this->l('All manufacturers').'</a><ul>'.PHP_EOL; 1 Link to comment Share on other sites More sharing options...
joaofilipe Posted December 7, 2013 Share Posted December 7, 2013 thanks vekia, do you know how to remove the link from post #32 ? Link to comment Share on other sites More sharing options...
vekia Posted December 8, 2013 Share Posted December 8, 2013 in blocktopmenu.php use code: $this->_menu .= '<li class="mymanufacturerlink"><a href="'.$link->getPageLink('manufacturer').'">'.$this->l('All manufacturers').'</a><ul>'.PHP_EOL; then somewhere in js scripts use this: $('.mymanufacturerlink').click(function(e) { e.preventDefault(); }); Link to comment Share on other sites More sharing options...
joaofilipe Posted December 8, 2013 Share Posted December 8, 2013 (edited) thanks a million vekia, i did what you said: i put the php code and the rest like this <script type="text/javascript"> $('.mymanufacturerlink').click(function(e) { e.preventDefault(); }); i get a syntax error and the FO is gone i get this error Edited December 8, 2013 by joaofilipe (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted December 8, 2013 Share Posted December 8, 2013 don't use this code in php files! paste it to header.tpl between {literal} {/literal} tags. then it will work. 1 Link to comment Share on other sites More sharing options...
joaofilipe Posted December 14, 2013 Share Posted December 14, 2013 Thanks vekia, sorry to check just now but sometimes virus can put us offline! fortunately was just a big flu and my pc is safe! if i get it right i put this code on the blocktopmenu.php $this->_menu .= '<li class="mymanufacturerlink"><a href="'.$link->getPageLink('manufacturer').'">'.$this->l('All manufacturers').'</a><ul>'.PHP_EOL; and the script in the header.tpl i have a doubt about where that file is. there is none in the blocktopmenu folder, the only one there is blocktopmenu.tpl, should i put it there? Link to comment Share on other sites More sharing options...
vekia Posted December 14, 2013 Share Posted December 14, 2013 i mean header.tpl file located in your theme directory Link to comment Share on other sites More sharing options...
joaofilipe Posted December 14, 2013 Share Posted December 14, 2013 um.. i pasted like this {literal} $('.mymanufacturerlink').click(function(e) { e.preventDefault(); }); {/literal} in several places in header.tpl from my theme folder and does not work... guess i´m doing something wrong... Link to comment Share on other sites More sharing options...
vekia Posted December 14, 2013 Share Posted December 14, 2013 hello sorry if i asked somewhere before: what is your page url? i will inspect it Link to comment Share on other sites More sharing options...
joaofilipe Posted December 14, 2013 Share Posted December 14, 2013 isn't online yet... it´s on the forge to go! still testing in localhost. the online shop still does not have these changes. maybe if you could show an example where and how to paste the code... if it is not much trouble. Thanks Link to comment Share on other sites More sharing options...
vekia Posted December 15, 2013 Share Posted December 15, 2013 open file: header.tpl paste this code: {literal} $(document).ready(function(){ $('.mymanufacturerlink').click(function(e) { e.preventDefault(); }); }); {/literal} before the </head> closing tag. 1 Link to comment Share on other sites More sharing options...
joaofilipe Posted December 15, 2013 Share Posted December 15, 2013 thanks vekia, but still not working, would you mind do the same for the code for blocktopmenu.php? maybe (for sure ) i´m doing something wrong again. Link to comment Share on other sites More sharing options...
vekia Posted December 15, 2013 Share Posted December 15, 2013 turn on browser console(ctrl+shift+j in chrome) then open front page of your store do you see there some errors? Link to comment Share on other sites More sharing options...
joaofilipe Posted December 15, 2013 Share Posted December 15, 2013 (edited) thanks vekia, on header.tpl the code is proper pasted on blocktopmenu.php where should i put ? $this->_menu .= '<li class="mymanufacturerlink"><a href="'.$link->getPageLink('manufacturer').'">'.$this->l('All manufacturers').'</a><ul>'.PHP_EOL; i pasted kinda random and got this warning on chrome console event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery-1.7.2.min.js:3 Edited December 15, 2013 by joaofilipe (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted December 16, 2013 Share Posted December 16, 2013 what class for "all manufacturers" you see when you check page source ? Link to comment Share on other sites More sharing options...
Marcelo Reis Posted June 18, 2014 Share Posted June 18, 2014 Gostei da sua explicação porem eu precisava saber como fazer um drop down a partir da categorias Link to comment Share on other sites More sharing options...
vekia Posted June 18, 2014 Share Posted June 18, 2014 if it is possible - please use english here Link to comment Share on other sites More sharing options...
romy1103 Posted March 25, 2015 Share Posted March 25, 2015 Hey There! I did followed all the above step but guess what a new menu with cams category gets created instead of appearing on the same categories menu.? I did added the cams categories with cams pages in Top Horizontal menu but still no luck Can you help? 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