How do I get the id of a deleted category from an Observer?
config.xml markup
<adminhtml>
<events>
<catalog_category_delete_after>
<observers>
<my_module>
<type>singleton</type>
<class>my_module/observer</class>
<method>onCategoryDeleteAfter</method>
</my_module>
</observers>
</catalog_category_delete_after>
</events>
</adminhtml>
Observer code would like something like:
class My_Module_Model_Observer
{
public function onCategoryDeleteAfter() {
#do something with deleted category id
}
}
Use the passed $observer variable.
class My_Module_Model_Observer
{
public function onCategoryDeleteAfter($observer) {
$observer->getEvent()->getCategory();
}
}