pascuald Posted April 7, 2014 Share Posted April 7, 2014 Hello ,I just want to put the Top-menu in the Nav-bar (on the left)i hooked the module so it appears normaly (with normal fonctionalities)but i still have 2 problems …1 - the top-menu is 100% large and i need to reduce it to 1/3 or half of the nav-bar2 - as i de-hooked it from Display Top the menu becomes a vertical list one… wich is unsuable for mesee my test at http://aneto.net/boutiqueSomeone with an idea or a solution ??sincerely Link to comment Share on other sites More sharing options...
tmk Posted April 7, 2014 Share Posted April 7, 2014 Hi But because maintenance mode no one can see Your problem. Link to comment Share on other sites More sharing options...
pascuald Posted April 7, 2014 Author Share Posted April 7, 2014 Argh !!!!!!! no more maintenance :-) Link to comment Share on other sites More sharing options...
dioniz Posted April 7, 2014 Share Posted April 7, 2014 (edited) Can you turn off CCC also Edited April 7, 2014 by dioniz (see edit history) Link to comment Share on other sites More sharing options...
pascuald Posted April 8, 2014 Author Share Posted April 8, 2014 Hello dioniz , Ok, i turn off CCC… let's see what happen ?? Link to comment Share on other sites More sharing options...
dioniz Posted April 8, 2014 Share Posted April 8, 2014 You didn't turn off for css Link to comment Share on other sites More sharing options...
pascuald Posted April 8, 2014 Author Share Posted April 8, 2014 sorry but i had just kept the 'Apache optimi' value but i turn it off now ( in fact i am not sure it is what you ask me to do :-) is it ok now ??? Link to comment Share on other sites More sharing options...
dioniz Posted April 8, 2014 Share Posted April 8, 2014 Ok now. So as i understand you want top menu to be like default theme, am i right? Link to comment Share on other sites More sharing options...
pascuald Posted April 8, 2014 Author Share Posted April 8, 2014 In fact i would like top menu in nav bar, exactly like the cart in fact but at the left (i don't need any phone number at the top) i have two problems… 1 - the top menu as you can see 2 - the size of top menu that i would like to reduce at 1/3 or 1/2 of the width I don't know why but top menu module don't work like cart module … the terrible vision of top menu comes as i de-hooked top menu from Display Top Also i don't know why but 'top menu' shows the sub-categories in horizontal line when i would like them in vertical line (like sub-sub categories) Am i clear ?? Thanks Link to comment Share on other sites More sharing options...
dioniz Posted April 8, 2014 Share Posted April 8, 2014 I don't know what have you done but your top menu is not loading yourtheme/css/modules/blocktopmenu/css/superfish-modified.css Do you have it in that path? Link to comment Share on other sites More sharing options...
pascuald Posted April 8, 2014 Author Share Posted April 8, 2014 What do you mean by 'in that path ??' The strange thing is that top menu looks good (except the width) if i leave the Display top module … but in this case, 'top menu' appears in the nav-bar and at the top of the page… (i can show you if you want) Do i have to re-initialize the top menu module ?? Link to comment Share on other sites More sharing options...
vekia Posted April 8, 2014 Share Posted April 8, 2014 What do you mean by 'in that path ??' does this file: yourtheme/css/modules/blocktopmenu/css/superfish-modified.css exist in your prestashop filesystem? Link to comment Share on other sites More sharing options...
pascuald Posted April 8, 2014 Author Share Posted April 8, 2014 (edited) hello Vekia Yes this file exist at the right place … In addition, i just try on a clean install of presta-bootstrap and the result is always the same… i can hooked topmenu in the nav-bar… but as i de-hooked it from 'topdisplay' (to keep it only in nav-bar) the menu doesn't appear normaly but like it is on my test it doesn't work like 'cart module' ?? Edited April 8, 2014 by pascuald (see edit history) Link to comment Share on other sites More sharing options...
dioniz Posted April 8, 2014 Share Posted April 8, 2014 Can you hook it back to displayTop for a moment just to check something Link to comment Share on other sites More sharing options...
pascuald Posted April 8, 2014 Author Share Posted April 8, 2014 Ok dioniz i hook it back and leave it like this thank's again to spend some time to solve this Link to comment Share on other sites More sharing options...
dioniz Posted April 8, 2014 Share Posted April 8, 2014 I guess you made some changes to header.tpl You can try like this. Leave it hooked as it is now. Make #block_top_menu width 65%, make .sf-menu li.sf-search input smaller width. But be aware your sublevels will open just 65% then. You will have to tweak some other things too. Link to comment Share on other sites More sharing options...
tmk Posted April 8, 2014 Share Posted April 8, 2014 (edited) It seems to be problem with themeconfigurator I don't know why but something force to use theme2.css instead of proper css for proper modules (superfish-modified.css in case of top menu). I dont know how themeconfigurator work but in Your case top menu use theme2.css located in boutique/modules/themeconfigurator/css/theme2.css instead superfish-modified.css No style - no effect. If I use proper style for elements from top menu it is working fine. Edited April 8, 2014 by tmk (see edit history) Link to comment Share on other sites More sharing options...
pascuald Posted April 8, 2014 Author Share Posted April 8, 2014 Thank you very much both of you I don't remember i have modify 'header.tpl' and it is true that i have choosen theme2.css (that i have modify in colors) but … It is exactly the same problem with a clean install (without any other modif not in header.tpl nor themeconfigurator). Things work fine for 'cartmodule' (whem you dehooked it from header, after install in navbar, it works perfectly), so i thought it could work the same for topmenu… too bad :-( I already try the reduction of topmenu width and visually it works but the whole menu is reduced and it is not what i would like to have on my nav-bar… (i would like on the same line, the 3 tabs on the left, the search module and then connection and cart on the right) i imagine that the solution is more complex and i am going to use another solution untill i find the right one. Thanks again both of you (and also Vekia) Sincerely Link to comment Share on other sites More sharing options...
tmk Posted April 8, 2014 Share Posted April 8, 2014 (edited) I checked it on clean install and You have right - the same behavior (manually hooked and dishooked in module/position in BO) The question is why in this configuration (topmenu hooked in displaynav only) presta not use css for this module (superfish-modified.css) I think that moving style from superfish-modified.css to global.css make it force to work but it is not really solution of this bug :/ Edited April 8, 2014 by tmk (see edit history) Link to comment Share on other sites More sharing options...
pascuald Posted April 8, 2014 Author Share Posted April 8, 2014 Glad that you confirm the problem… but i am definitively not good enough in programm to try to solv it by myself i am still working on my test and dioniz info help but the real solution is not there… i don't understand why it is not as simple as for the cart module… thanks again and if you have any solution, let me know sincerely Link to comment Share on other sites More sharing options...
dioniz Posted April 8, 2014 Share Posted April 8, 2014 That's really strange cause it has this code in blocktopmenu.php public function hookDisplayNav($params) { return $this->hookDisplayTop($params); } As i understand it should use all parameters from displayTop Link to comment Share on other sites More sharing options...
dioniz Posted April 8, 2014 Share Posted April 8, 2014 I tested it too on clean install and looks like bug to me Link to comment Share on other sites More sharing options...
pascuald Posted April 9, 2014 Author Share Posted April 9, 2014 (edited) Thanks again dioniz… but it seems it has no simple solution for the moment… To anyone who has an idea, i leave the test (with unhooked from DisplayToppage) at aneto.net/boutique Note that TPL and CSS files are different in 'modules', 'theme/bootstrap/css/modules' and 'theme/bootstrap/modules' 's folders sincerely Edited April 9, 2014 by pascuald (see edit history) Link to comment Share on other sites More sharing options...
tmk Posted April 10, 2014 Share Posted April 10, 2014 (edited) I spend three days on it and I find one can say a solution. You need to edit blocktopmenu.php and in public function install() add this line to call displayHeader !$this->registerHook('displayHeader') || so the whole function look like: public function install() { if (!parent::install() || !$this->registerHook('displayTop') || !$this->registerHook('displayHeader') || !Configuration::updateGlobalValue('MOD_BLOCKTOPMENU_ITEMS', 'CAT3,CAT26') || !Configuration::updateGlobalValue('MOD_BLOCKTOPMENU_SEARCH', '1') || !$this->registerHook('actionObjectCategoryUpdateAfter') || !$this->registerHook('actionObjectCategoryDeleteAfter') || !$this->registerHook('actionObjectCategoryAddAfter') || !$this->registerHook('actionObjectCmsUpdateAfter') || !$this->registerHook('actionObjectCmsDeleteAfter') || !$this->registerHook('actionObjectCmsAddAfter') || !$this->registerHook('actionObjectSupplierUpdateAfter') || !$this->registerHook('actionObjectSupplierDeleteAfter') || !$this->registerHook('actionObjectSupplierAddAfter') || !$this->registerHook('actionObjectManufacturerUpdateAfter') || !$this->registerHook('actionObjectManufacturerDeleteAfter') || !$this->registerHook('actionObjectManufacturerAddAfter') || !$this->registerHook('actionObjectProductUpdateAfter') || !$this->registerHook('actionObjectProductDeleteAfter') || !$this->registerHook('actionObjectProductAddAfter') || !$this->registerHook('categoryUpdate') || !$this->registerHook('actionShopDataDuplication') || !$this->installDB()) return false; return true; } Then You need to change hookDisplayNav function to this: public function hookDisplayNav($params) { $this->user_groups = ($this->context->customer->isLogged() ? $this->context->customer->getGroups() : array(Configuration::get('PS_UNIDENTIFIED_GROUP'))); $this->page_name = Dispatcher::getInstance()->getController(); if (!$this->isCached('blocktopmenu.tpl', $this->getCacheId())) { $this->makeMenu(); $this->smarty->assign('MENU_SEARCH', Configuration::get('MOD_BLOCKTOPMENU_SEARCH')); $this->smarty->assign('MENU', $this->_menu); $this->smarty->assign('this_path', $this->_path); } $html = $this->display(__FILE__, 'blocktopmenu.tpl', $this->getCacheId()); return $html; } and add just below hookHeader function like this: public function hookHeader() { $this->context->controller->addJS($this->_path.'js/hoverIntent.js'); $this->context->controller->addJS($this->_path.'js/superfish-modified.js'); $this->context->controller->addJS($this->_path.'js/blocktopmenu.js'); $this->context->controller->addCSS(($this->_path).'css/blocktopmenu.css', 'all'); $this->context->controller->addCSS(($this->_path).'css/superfish-modified.css', 'all'); } Next step is to clear cache etc.... and now Your blocktopmenu need to bee hooked in BO to both displayNav and displayHeader Rest is proper order in displaynav hook with the rest of modules in this hook and few changes in css Note! If You reposition menu back to displayTop You must unhook this module from displayHeader because css and js files could be included twice. I don't know what could happen then. If someone is interested why problem with topmenu in nav is present or in fact: - why some modules can or cannot bee hooked to specific area - why module can bee hooked but css and js files are not loading despite addCSS and addJS present in function just let me know I try to explain how I can and what I understand it. Edited April 10, 2014 by tmk (see edit history) Link to comment Share on other sites More sharing options...
pascuald Posted April 11, 2014 Author Share Posted April 11, 2014 Hello tmk, Wahou !!!!! first of all, thank you for your time on this trouble… I will test this week-end your solution but as i am in category 'before begginner' i need some explanations… 1 - what do you mean with 'public function' ????? 2 - "add this line to call displayHeader" , ok but how and where do i add this line ?? 3 - what is BO in "Your blocktopmenu need to bee hooked in BO to both" Again and again thank you veru much… i'll tell you when it's done :-))) Sincerely Link to comment Share on other sites More sharing options...
tmk Posted April 11, 2014 Share Posted April 11, 2014 (edited) Hi 1. and 2. Every changes you make in file: blocktopmenu.php look at this file and compare the content with code I've wrote above 3. BO stands for Back Office (Your admin panel) If you are not familiar with php simply backup your original blocktopmenu.php and replace with attached one. This modified file is from presta 1.6.0.5 not updated module. blocktopmenu.php Edited April 11, 2014 by tmk (see edit history) Link to comment Share on other sites More sharing options...
dioniz Posted April 11, 2014 Share Posted April 11, 2014 Maybe they fixed this in 1.3.7 Link to comment Share on other sites More sharing options...
pascuald Posted April 11, 2014 Author Share Posted April 11, 2014 hello dioniz , you mean 1.3.7 of Topmenubar ??? tomorrow, i'll try tmk's solution today i update v1.6.0.6 and an 'old' pbs came back 'my home ' :-) blockcart in the menu-bar don't go on the right ah ah ah !!! my test is now at www.jeux2meaux.fr (it's more simple to me) i'll also look after v1.3.7 Link to comment Share on other sites More sharing options...
pascuald Posted April 12, 2014 Author Share Posted April 12, 2014 Hello , Thanks to tmk, the modified file works perfectly , even with 1.6.0.6 you can see at www.jeux2meaux.fr My pb now is to put everybody on one line with topmenu on left and cart on right… and i don't know why but it doesn't work for the moment (i ask some help on a new post for this) Thanks again to both dioniz and tmk for their help… Sincerely 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