2

In Magento, how can I see all the event names which are fired when an event occurs in the frontend or backend (after some customer or admin action)?

1

1 Answer 1

0

There is no clean method to do this (in my knowledge). However you can log all of of event names that get called during a page request. For this put this single code snippet inside Mage::dispatchEvent().

File : app\Mage.php

 self::log('Event : ' . $name, null, 'events.log', true);

Put this code inside the function dispatchEvent() as its first line. Then load any page. Now go to the location var\log\events.log and open it. You can see an enormous records that holds event names in it.

You can see multiple records for the same event name. That is because, those events get called multiple times

Note: Do not forget to revert back the changes in Mage.php, after inspection. Also always delete the previous contents inside events.log, before the another page load takes place.

Hope that helps

Not the answer you're looking for? Browse other questions tagged or ask your own question.