0
如何從Observer獲取已刪除類別的ID?獲取已刪除類別的ID [Magento]
config.xml中標記
<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>
觀察代碼想是這樣的:
class My_Module_Model_Observer
{
public function onCategoryDeleteAfter() {
#do something with deleted category id
}
}