Jump to content

[Solved] Pls Help With New Hook Creation


rickczsu

Recommended Posts

Hi. I want to create new hook for authentification.tpl. Hook name should be something like 

{$HOOK_LOGIN_ACCOUNT_FORM}

. (as copy of  {$HOOK_CREATE_ACCOUNT_FORM} but on another place.

In my module -> install()

$this->registerHook('loginAccountForm');

And I call that hook 

function hookDisplayLoginAccountForm($params){
       global $smarty;
return $this->display(_PS_MODULE_DIR_.$this->name, 'views/templates/front/fblogin.tpl');
} 

Same as hookDisplayLoginAccountForm($params)
But it don´t work and i don´t know where I am doing mistake.

Thank you for any help
Edited by rickczsu (see edit history)
Link to comment
Share on other sites

Have it.
Install

$this->registerHook('modulenameLoginForm');

 

Hook in module

 
 public function hookModulenameLoginForm($params){
   return $this->display(_PS_MODULE_DIR_.$this->name,'views/templates/front/tplname.tpl');
 }

 

Then in tpl

{hook h='modulenameLoginForm'}

 

 

 

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...