Jump to content

Registering to hook only available for module?


blackarma
 Share

Recommended Posts

Hey,

 

Writing some custom csv import stuff and i would like to register for "actionCustomerAddBefore" hook from my override controller (NOT MODULE).

Looking at the source of Hook class it looks like only modules have option like that.

 

Do i really have to create module just to register for this hook?

Edited by blackarma (see edit history)

Share this post


Link to post
Share on other sites

I fear yes. 

 

The function to register on hooks depends heavily on the presence of a module, as also the way it is stored in a database (uses id_module) and how the Hook caller searches for the method to call associated with it. 

 

So there is no easy way to even "hack" a different method in it without writing a module. 

 

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More