I want to export data of a category when its save in magento system. So, I also create a module & create a event name which is catalog_category_save_commit_after. My code is like below..
<config>
<global>
....
<events>
<catalog_category_save_commit_after>
<observers>
<category_category_observer>
<type>singleton</type>
<class>Feed_Category_Model_Category_Observer</class>
<method>saveCategoryData</method>
</category_category_observer>
</observers>
</catalog_category_save_commit_after>
</events>
</global>
class Feed_Category_Model_Category_Observer
{
public function saveCategoryData($observer)
{
$category = $observer->getEvent()->getDataObject();
Mage::log($category);
// or
Mage::log($observer->getEvent()->getCategory());
}
}
Both are return blank. Have any idea??
Mage::log('what to log', null, 'system.log', true);
Zend_Log::DEBUG
. Look in theMage::log
method for more detailsMage::log($category, null, 'observer_category_data.log');
. It's work