Events Magento:查找已调度事件的观察者?

Events Magento:查找已调度事件的观察者?,events,magento,hook,observer-pattern,Events,Magento,Hook,Observer Pattern,我需要找到在调度以下事件时激发哪些方法 Mage::dispatchEvent('sales_quote_add_item', array('quote_item' => $item)); 我知道如何创建自定义事件挂钩,它应该保存在config.xml中,但我在任何配置xml中都找不到此sales\u qute\u add\u项目的挂钩。像这样做 <events> <sales_quote_add_item> <observer

我需要找到在调度以下事件时激发哪些方法

   Mage::dispatchEvent('sales_quote_add_item', array('quote_item' => $item));
我知道如何创建自定义事件挂钩,它应该保存在config.xml中,但我在任何配置xml中都找不到此sales\u qute\u add\u项目的挂钩。

像这样做

<events>
    <sales_quote_add_item>
        <observers>
            <your_observer_name>
                <type>model</type>
                <class>Your_Observer_Class</class>
                <method>yourObserverMethod</method>
            </your_observer_name>
        </observers>
      </sales_quote_add_item>
</events>

模型
你的班
yourObserverMethod
像这样做

<events>
    <sales_quote_add_item>
        <observers>
            <your_observer_name>
                <type>model</type>
                <class>Your_Observer_Class</class>
                <method>yourObserverMethod</method>
            </your_observer_name>
        </observers>
      </sales_quote_add_item>
</events>

模型
你的班
yourObserverMethod

没关系。在Magento中,没有此事件的默认侦听器。Magento核心团队专门为定制目的添加了此事件。

没问题。在Magento中,没有此事件的默认侦听器。Magento core团队专门为定制目的添加了此事件。

只需搜索所有配置xml文件即可

<sales_quote_add_item>


如果它在事件标记中,那么查看方法和类以查看它在哪个文件中。

只需搜索所有配置xml文件即可

<sales_quote_add_item>

如果它在事件标记中,那么查看方法和类以查看它在哪个文件中