Jump to content

How to 'hook' to a non visible hook?


Recommended Posts

Hi,

 

I'm trying to hook to createAccount hook. I tried to transplant my module to 'Successful customer crate account' but it gives me a warning.

 

This module is already transplanted to this hook.

 

What im trying to do is to make a custom redirect after successful account creation.

 

Also, where can I find the function documentation of createAccount ?

I think it may be possible to pass a redirect url to it?

 

Thanks. I hope somebody replies this time.

Link to comment
Share on other sites

  • 1 month later...

I have the exact same question, does anyone know how to transplant a module to an action hook? In my case I get the "This module can't get transplanted to this hook" error.

 

I've correctly registered the hook and the proper funcion in the module with no success.

 

Any ideas anyone?

Link to comment
Share on other sites

The best way is to create a module that hooks to "create account". You can see a sample here:

\modules\referralprogram\referralprogram.php

 

public function hookCreateAccount($params)

in that method you need to implement the redirect.

 

 

note that this hook must be registered at the module install() method:

$this->registerHook('createAccount')

 

This way there's no need to setup it from BackOffice -> Modules -> Positions.

Link to comment
Share on other sites

×
×
  • Create New...