meiosdecomunicacao Posted September 2, 2008 Share Posted September 2, 2008 How can i create and associate new hooks on my new theme.This is the way i'm doing it, but it's not workinga) Create the new hook on table 'hook' | ID | NAME | TITLE | DESCRIPTION | POSITION | -------------------------------------------- | 32 | test | Test | Test Hook | 1 | Add a hookTest function to the module and create the tpl file if necessary function hookTest($params) { ... } c) Transplant the module to the hook i've just created.d) Add the {$HOOK_TEST} in the theme.c) Test it.Result: Nothing happens. Link to comment Share on other sites More sharing options...
Damien Metzger Posted September 2, 2008 Share Posted September 2, 2008 Hi,{$HOOK_TEST} must be assigned from the php file which has called the tpl.If you want this in product.tpl for example, you have to add the following line in product.php : $smarty->assign('HOOK_TEST', Module::hookExec('test')); (Something like that at least ^^) Link to comment Share on other sites More sharing options...
hieloiceberg Posted January 20, 2009 Share Posted January 20, 2009 Hello all can anybody guide me in the right direction on how to make a simple hook I have try what Damien says but have no idea where to add the code or what do I need to do to make it work!!I will appreciated very much if anybody helps me out.Thank you very much! Link to comment Share on other sites More sharing options...
hieloiceberg Posted January 20, 2009 Share Posted January 20, 2009 I need a hook anybody? Link to comment Share on other sites More sharing options...
hieloiceberg Posted January 20, 2009 Share Posted January 20, 2009 Sweet!! made my first Hook %-P Link to comment Share on other sites More sharing options...
Travis Posted January 21, 2009 Share Posted January 21, 2009 Sweet!! made my first Hook %-P lol :-) Link to comment Share on other sites More sharing options...
Katmatcreations Posted January 22, 2009 Share Posted January 22, 2009 lol now he is hooked! 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