Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Automatic after and before events
 
Zmajche34
Jr. Member
 
Total Posts:  1
Joined:  2012-10-15
 

I have a suggestion to avoid overriding controllers in plugins.
It could be implementing in Magento core automatic after and before events for every action in controllers.
The naming convention could be:

$_some_prefix $controller_name "_" $action_name
 
Magento Community Magento Community
Magento Community
Magento Community
 
Siggi_Schmitz
Enthusiast
 
Avatar
Total Posts:  811
Joined:  2011-07-03
 

It is implemented grin

Just go in a controller action method and echo or log: “$this->getFullActionName()”;

Let`s say the output is “save_product”, then the events are:

controller_action_predispatch_save_product” and ”controller_action_postdispatch_save_product”

That`s automatic generated events in every action method.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top