albidin Posted April 18, 2014 Share Posted April 18, 2014 I would like to move QUICK SEARCH and CART modules in TOPBANNER module. Can I have an advise for possible option. Link to comment Share on other sites More sharing options...
vekia Posted April 18, 2014 Share Posted April 18, 2014 you can do it in several ways. 1) create new hook, insert {hook::exec("your_hook")} inside blocktop menu tpl file - then attach modules to this hook. 2) modification of tpl files (each module you want to insert to the top menu + blocktopmenu.tpl) just leave top menu unclosed (</div>) and close this div in last module you want to attach to top menu. Remember about correct modules order on modules > postions page Link to comment Share on other sites More sharing options...
albidin Posted April 19, 2014 Author Share Posted April 19, 2014 Hi Milos! I've tried as per option 1: I created hook in ps_hook table, inserted record in block top menu.tpl and on the last stage to add modules to the hook I am getting an error message " This module cannot be transplanted to this hook." Please advise what I am doing wrong? Link to comment Share on other sites More sharing options...
vekia Posted April 19, 2014 Share Posted April 19, 2014 you have to create function (in module php file) to handle this hook. like: public function hookYour_hook($params) { } Link to comment Share on other sites More sharing options...
albidin Posted April 21, 2014 Author Share Posted April 21, 2014 I've tried to do, but I have the same result... Link to comment Share on other sites More sharing options...
vekia Posted April 21, 2014 Share Posted April 21, 2014 it mean, that you use different hook name in database, and different in your function. Link to comment Share on other sites More sharing options...
albidin Posted April 21, 2014 Author Share Posted April 21, 2014 I checked this before - name is is identical Link to comment Share on other sites More sharing options...
albidin Posted April 21, 2014 Author Share Posted April 21, 2014 Just one strange thing - when I am creating new hook in ps_hook table all the time system returning error result like this, but new hook showing in the system: INSERT INTO `ps_hook` ( `id_hook` , `name` , `title` , `description` , `position` , `live_edit` ) VALUES ( NULL , 'aaa', 'my aaa', 'super hook', '1', '0' ); MySQL: #1062 - Duplicate entry 'aaa' for key 'hook_name' Link to comment Share on other sites More sharing options...
vekia Posted April 21, 2014 Share Posted April 21, 2014 this message means that "aaa" hook already exists in your database. now you have to define in your module function: function hookaaa($params){ } Link to comment Share on other sites More sharing options...
albidin Posted April 21, 2014 Author Share Posted April 21, 2014 Unfortunately, I can't pass though this stage. I did several times with no success.All the time the same message that module can not be transplanted . Link to comment Share on other sites More sharing options...
vekia Posted April 21, 2014 Share Posted April 21, 2014 can you create different hook name? for exmaple MyNewHook then use hookMyNewHook($params) function in your module .php file. can you show your file? Link to comment Share on other sites More sharing options...
albidin Posted April 22, 2014 Author Share Posted April 22, 2014 I did with different names before. As a result - no result. Link to comment Share on other sites More sharing options...
albidin Posted April 22, 2014 Author Share Posted April 22, 2014 https://drive.google.com/folderview?id=0B0raWtLZR6-BUGUwWWhqSjJtMVE&usp=sharing Link to comment Share on other sites More sharing options...
vekia Posted April 22, 2014 Share Posted April 22, 2014 i see there only "hookaaa" btw. i tried to add it on my own, and everything works well Link to comment Share on other sites More sharing options...
albidin Posted April 23, 2014 Author Share Posted April 23, 2014 Shall I give you access to my site? I can't understand what's wrong. Link to comment Share on other sites More sharing options...
vekia Posted April 23, 2014 Share Posted April 23, 2014 sure i can check it Link to comment Share on other sites More sharing options...
albidin Posted April 23, 2014 Author Share Posted April 23, 2014 I just sent login details by email Link to comment Share on other sites More sharing options...
albidin Posted April 25, 2014 Author Share Posted April 25, 2014 Hi Vekia, did you have an opportunity to check this issue? Link to comment Share on other sites More sharing options...
vekia Posted April 25, 2014 Share Posted April 25, 2014 i transplanted module "blocktopmenu" to this new hook (aaa) without any problem i unhooked blocktopmenu from this section. then i tried to transplant block cart, but i can't it mean that block cart module .php file doesnt contain function that i suggested to use. i think the problem is a bit different. your topbaner contains image, it's full width, there is no "space" to display additional blocks. Link to comment Share on other sites More sharing options...
albidin Posted April 25, 2014 Author Share Posted April 25, 2014 Hmmm Is it possible to put them like another layer? Link to comment Share on other sites More sharing options...
albidin Posted April 25, 2014 Author Share Posted April 25, 2014 The main idea was to create banner with specific space in order to put these modules there. Any ideas, [spam-filter]? Link to comment Share on other sites More sharing options...
albidin Posted April 26, 2014 Author Share Posted April 26, 2014 What if to remove TOPBANNER module and insert image like a background image on the top of the page and insert QUICK SEARCH and BLOCK CART modules after that ? Link to comment Share on other sites More sharing options...
Recommended Posts