sanl Posted June 13, 2014 Share Posted June 13, 2014 Hello, I figure out that i cant use any module in Header cuz its only for js/css and if I use my module in Header I have it in perfect position but JS is not working. Is any way to make JS work? Another way I tryed to add new hook: 1. In DB I add Top2 2. In theme/header.php : 'HOOK_TOP2' => Module::hookExec('Top2'), 3. Found hook menu and after this div I add my code: <div class="blockadvmulti">{$HOOK_TOP2}</div> // class blockadvmulti - its ads module for banners 4. In module function install add: if ( parent::install() == falseOR $this->registerHook('backOfficeHeader') == falseOR $this->_createTables() == falseOR $this->registerHook('header') == falseOR $this->registerHook('Top2') == false And function to hook: function hookTop2($params){return $this->_processHook( $params, 1);} This module has 5 params, so I just change top to top2. But I still cant see banner in this place. What did i do wrong? Link to comment Share on other sites More sharing options...
vekia Posted June 14, 2014 Share Posted June 14, 2014 you defined (added) top2 hook to your database? Link to comment Share on other sites More sharing options...
sanl Posted June 16, 2014 Author Share Posted June 16, 2014 (edited) you defined (added) top2 hook to your database? I found my problem, but thank u! Edited June 16, 2014 by mantasl (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 16, 2014 Share Posted June 16, 2014 and you transplanted module to this hook? under modules > positions tab in back office? Link to comment Share on other sites More sharing options...
sanl Posted June 16, 2014 Author Share Posted June 16, 2014 and you transplanted module to this hook? under modules > positions tab in back office? It was not my shop, but I found that there is a new hook in DB: Top2 so I tryed to use it , but no effect. I created a new hook in DB, did the same things and it works! After this transplanted module and now im happy So if somebody need something like this: Register hook in module.php Function to hook Add your hook in tpl Transplant to correct hook be happy ) 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