steviger Posted April 7, 2015 Share Posted April 7, 2015 (edited) Hi guys, I would like to move the horizontal top menu just below the slider like the design in the attached image. Apparently it can't be transplanted to the hook displayTopColumn.I found this post but there's no reaction (yet).The Vekia solution is for transplanting the module to displayHeader section. Anyone?Thanks in advance!Cheers,Steven Edited April 8, 2015 by steviger (see edit history) Link to comment Share on other sites More sharing options...
MichałM Posted April 7, 2015 Share Posted April 7, 2015 Yes it is possible. You should override core file of this module and add to horizontal menu new hook. More info: http://nemops.com/override-prestashop-modules-core/#.VSPurJMuib8 1 Link to comment Share on other sites More sharing options...
steviger Posted April 8, 2015 Author Share Posted April 8, 2015 Hi, Thanks for your reply. I read your article and I think I do understand the override principle but since I'm not really (or rather really not..) a coder, could you help me with an example for my situation? It will be much appreciated! Link to comment Share on other sites More sharing options...
MichałM Posted April 8, 2015 Share Posted April 8, 2015 Try to add this code in override/modules/blocktopmenu: class BlocktopmenuOverride extends Blocktopmenu { public function __construct() { parent::__construct(); if($this->id && !$this->isRegisteredInHook('displayTopColumn')) $this->registerHook('displayTopColumn'); } public function install($delete_params = true) { $this->registerHook('displayTopColumn'); return parent::install(); } public function hookDisplayTopColumn($params) { return $this->hookDisplayTop($params); } } 1 Link to comment Share on other sites More sharing options...
steviger Posted April 8, 2015 Author Share Posted April 8, 2015 Thanks man, works like a charm! For those who want the same thing, here's what I did: In the folder override I made a folder called blocktopmenu. Inside that folder I put a blocktopmenu.php with this code: <?php class BlocktopmenuOverride extends Blocktopmenu { public function __construct() { parent::__construct(); if($this->id && !$this->isRegisteredInHook('displayTopColumn')) $this->registerHook('displayTopColumn'); } public function install($delete_params = true) { $this->registerHook('displayTopColumn'); return parent::install(); } public function hookDisplayTopColumn($params) { return $this->hookDisplayTop($params); } } Next I transplanted the module to displayTopColumn section. Go to modules > positions tab in the back office. On the top right window part you can see anchor icon with "transplant a module" text. Click on it and you will see form where you have to: from first dropdown named "Module" select: Top horizontal menu from second dropdown named "Hook into" select "displayTopColumn (Top column blocks)"Finally, don't forget to change the order in the displayTopcolumn section in order to display the menu under or above the slideshow. You can find it here: modules > positions tab in the back office>bottom of the page. 1 Link to comment Share on other sites More sharing options...
infor-sol Posted August 9, 2015 Share Posted August 9, 2015 Works fine in PS 1.6.1.0! Thank you both! The override full path is: root/override/modules/blocktopmenu/blocktopmenu.php Link to comment Share on other sites More sharing options...
whoaloic Posted September 30, 2015 Share Posted September 30, 2015 Hi I try your solution and it works except I get the alert message "This module is already transplanted to this hook". I'm trying the same with module Blockcmsinfo but I get an error "js_def" in the frontend. Any help please? Link to comment Share on other sites More sharing options...
steviger Posted October 1, 2015 Author Share Posted October 1, 2015 Hi, What module causes the message? Link to comment Share on other sites More sharing options...
whoaloic Posted October 1, 2015 Share Posted October 1, 2015 I have tried both HorizontalTopMenu and Blockcmsinfo and got the message "This module is already transplanted to this hook". Although I get this message, I have manage to hook a new position for HorizontalTopMenu but not for Blockcmsinfo. Link to comment Share on other sites More sharing options...
Modock Posted November 18, 2015 Share Posted November 18, 2015 Thank you for this topic, it's OK with a french PS 1.6.1.1 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