Jump to content

how to create new hook in contact-form.tpl


Recommended Posts

hey ,

i wanna to put text above the contact form.

i created new hook -

INSERT INTO `ps_hook` (`name`, `title`, `description`)
VALUES ('BeforeContactFrom', 'BeforeContactForm', 'Hooks before the contact form');

and then i call the hook inside contact-form.tpl file - 

{$HOOK_BeforeContactForm}

and i attached module to the new position (Content Box Module) , and its does not work for me :(...

the text dosent appear...

Link to comment
Share on other sites

You also need to fill $HOOK_BeforeContactForm variable in your module:

$this->context->smarty->assign(array(
    'HOOK_BeforeContactForm' => Hook::exec('BeforeContactFrom', array(
        'option1' => 'aaa',
        'option2' => 'bbb',
    ))
));
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...