emma1 Posted May 13, 2014 Share Posted May 13, 2014 (edited) When i hook the blocktopmenu to displaynav the blocktopmenu is no longer styled by superfish-modified.css instead its styled by global.css. Anyone know why this is happening? Is this a bug or am i missing something? (v.1.6) Edited May 13, 2014 by emma1 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 13, 2014 Share Posted May 13, 2014 what prestashop version you use? you posted topic in 1.5 section but i see that you use displayNav hook - it's a part of 1.6 installation so i suppose that it's 1.6, right? Link to comment Share on other sites More sharing options...
emma1 Posted May 13, 2014 Author Share Posted May 13, 2014 oh sorry, i didnt know this was the wrong section. Yes, the version is 1.6. Link to comment Share on other sites More sharing options...
vekia Posted May 13, 2014 Share Posted May 13, 2014 no worries i moved this topic to 1.6 section and im going to search a solution :-) 1 Link to comment Share on other sites More sharing options...
vekia Posted May 13, 2014 Share Posted May 13, 2014 okay i wrote guide for that: step by step guide with detailed descriptions and pictures: how to move block top menu module to top section open module file: blocktopmenu.php add there function code: public function hookHeader($params){ $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'); $this->context->controller->addCSS($this->_path.'css/superfish-modified.css'); } then go to modules > positions and transplant blockTopMenu module to displayHeader hook 1 Link to comment Share on other sites More sharing options...
emma1 Posted May 13, 2014 Author Share Posted May 13, 2014 (edited) yeah! now it works, i love you! Is it correct that i should edit the php file in the core files? they shouldnt be moved or anything to my theme folder? Edited May 13, 2014 by emma1 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 13, 2014 Share Posted May 13, 2014 yes, it's correct. you can't override module .php file so original module file is the proper one. Link to comment Share on other sites More sharing options...
hgarcia Posted August 7, 2014 Share Posted August 7, 2014 (edited) Hello. I may be doing something wrong. I followed all the tutorial instructions, step by step, twice. I can hook the menu on displayNav... but it loses all javascript's operation. Hover effect doesn't work, neither the hyperlinks.. This is my store. ver 1.606 http://bit.ly/1zY1R9q What could be missing? Edit:. I forgot to mention. The hookdisplayHeader is on blocktopmenu.php. Just Bellow hookDisplayNav function. Best regards Edited August 7, 2014 by hgarcia (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 8, 2014 Share Posted August 8, 2014 strange i can't open your website due to this: Link to comment Share on other sites More sharing options...
hgarcia Posted August 8, 2014 Share Posted August 8, 2014 strange i can't open your website due to this: Sorry. Geolocation settings. It's open now for U.S. and Europe. At this moment, I have the menu hooked on : displayHeader actionCategoryUpdate displayNav displayTop -- only because i need to keep working on the store. When I navigate to a tab from displayTop, I can see the same tab shaded on Nav bar . I'm thinking that maybe there is a div or something over the menu, that it's blocking it. Many thanks. And the best regards. Link to comment Share on other sites More sharing options...
vekia Posted August 8, 2014 Share Posted August 8, 2014 you also added code to associate javascripts with hookheader ? Link to comment Share on other sites More sharing options...
hgarcia Posted August 8, 2014 Share Posted August 8, 2014 you also added code to associate javascripts with hookheader ? Yes. i did. I found a solution!! I was posting it when your reply came in. First of all Emma, my apologizes for hijacking your post. here are my results: All the steps on your tutorial plus: On /modules/blocktopmenu/blocktopmenu.php public function hookDisplayNav($params) { return $this->hookDisplayTop($params); $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'); $this->context->controller->addCSS($this->_path.'css/superfish-modified.css'); } public function hookdisplayHeader($params){ $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'); $this->context->controller->addCSS($this->_path.'css/superfish-modified.css'); } On /themes/default-bootstrap/css/modules/blocktopmenu/css/blocktopmenu.css #block_top_menu { padding-top: 1px;/*25px;*/ padding-bottom: 1px; padding-left: 0px; z-index: 28895; } With that code, I also moved the block top menu to the left. Now, Block Top Menu is hooked on displayHeader actionCategoryUpdate displayNav Many thanks!!! Link to comment Share on other sites More sharing options...
Recommended Posts