protected function _logAdminAction($username, $userId, $details) { $eventCode = 'catalog_products'; //可用的event code 参见后台Admin Actions Log中Aciton Group下拉框的值 if (!Mage::getSingleton('enterprise_logging/config')->isActive($eventCode, true)) { return; } return Mage::getSingleton('enterprise_logging/event')->setData(array( 'ip' => Mage::helper('core/http')->getRemoteAddr(), 'user' => $username, 'user_id' => $userId, 'is_success' => true, 'fullaction' => "adminhtml_catalog_product_save", 'event_code' => $eventCode, 'action' => 'save', 'info' =>$details, ))->save(); }