Jump to content

Out-of-box Action Hooks


pulktisinghal

Recommended Posts

I've read the 1.5 docs and gone through some of the forum posts around action hooks as well:

http://www.prestashop.com/forums/topic/276894-how-to-use-action-hooks/?p=1392070

 

But there are still a few things that haven't been spelled out for me:

 

(1) Who invokes action hook?

An obvious assumption would be that action hooks are invoked by the core code and if that's correct, then: (2) Is it a given that to leverage an out-of-box action hook like actionValidateOrder or actionProductAttributeUpdate, the module must register itself with the same exact name?

 

(3) If three completely different modules all want to have their action code triggered for actionProductAttributeUpdate, and they all register as:

$this->registerHook('actionProductAttributeUpdate');

Then do they all get called whenever the event is triggered in PrestaShop. Sort of like a multicast?

 

(4) If unique names are a factor when registering a hook then how can modules associate themselves with out-of-box action hooks/triggers?

Edited by pulktisinghal (see edit history)
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...