Skip to content

Instantly share code, notes, and snippets.

@americkson
Last active December 22, 2015 20:19
Show Gist options
  • Save americkson/6525690 to your computer and use it in GitHub Desktop.
Save americkson/6525690 to your computer and use it in GitHub Desktop.
Get a list of Events fired in Magento
Look in the file:
app/Mage.php
in Mage.php look for the dispatchEvent() function
public static function dispatchEvent($name, array $data = array())
inside the dispatchEvent() function add a Mage::log()
Mage::log('events: '.$name);
Here is a link to all Magneto events for 1.7:
http://www.nicksays.co.uk/magento-events-cheat-sheet-1-7/
Here is a python script jeff wrote that removes the duplicated
#!/usr/bin/python
uniqlines = set(open('/home/jeff/www/aai/libertysport.com/var/log/system.log').readlines())
bar = open('/tmp/events.txt', 'w').writelines(set(uniqlines))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment