Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Take a look at <a href="https://github.com/LokeyCoding/magento-mirror/blob/magento-1.7/app/code/core/Mage/Core/Model/Abstract.php#L336" rel="noreferrer">Mage_Core_Model_Abstract::afterCommitCallback</a> - it has a generic event <em>and</em> an event dispatched by the prefix of the specific model being saved.</p> <pre><code>/** * Callback function which called after transaction commit in resource model * * @return Mage_Core_Model_Abstract */ public function afterCommitCallback() { Mage::dispatchEvent('model_save_commit_after', array('object'=&gt;$this)); Mage::dispatchEvent($this-&gt;_eventPrefix.'_save_commit_after', $this-&gt;_getEventData()); return $this; } </code></pre> <p>Whether you want this or</p> <pre><code>/** * Processing object after save data * * @return Mage_Core_Model_Abstract */ protected function _afterSave() { $this-&gt;cleanModelCache(); Mage::dispatchEvent('model_save_after', array('object'=&gt;$this)); Mage::dispatchEvent($this-&gt;_eventPrefix.'_save_after', $this-&gt;_getEventData()); return $this; } </code></pre> <p>depends on whether you care if the data has actually been written to the database or not when you run your event handler.</p> <p>When Magento sees a call to <code>Mage::dispatchEvent</code> it will call any public model class registered for that specific event name. So the real place to look for events is in the config.xml for the module/models you're interested in. The xml is not likely to be programmatically generated, so you don't have to fuss around with guessing <code>_eventPrefix</code> values. You know the event suffix you want, so just look in configuration for events with names ending with that suffix.</p> <p>If you have an installed store, you can use <a href="https://github.com/netz98/n98-magerun" rel="noreferrer">n98-magerun</a> to search the config.xml. (It has a config:get command that you can use to search, but I prefer <code>config:dump</code> to a file, followed by using an xml parser and xpath to search through the result.)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload