2013-11-25 18 views

回答

2

相當多的事件被稱爲與頁面渲染相關的事件,涉及加載模型的事件,與添加購物車本身有關的事件。沒有確定的列表,因爲任何模塊都可以添加自己的事件。

您可以做的最好的事情是記錄所有正在調用的事件並查看特定於您的安裝/配置的事件列表。

編輯app/Mage.php,尋找Mage::dispatchEvent和下面的行添加到它:

public static function dispatchEvent($name, array $data = array()) { 
    /** add the line below */ 
    Mage::log($name, null, 'events.log', true); 
    Varien_Profiler::start('DISPATCH EVENT:'.$name); 
    $result = self::app()->dispatchEvent($name, $data); 
    #$result = self::registry('events')->dispatch($name, $data); 
    Varien_Profiler::stop('DISPATCH EVENT:'.$name); 
    return $result; 
} 
相關問題