我正在尝试忽略在_prepareForm()方法中的app / code / core / Mage / Adminhtml / Block / Promo / Quote / Edit / Tab / Actions.php文件中调度的adminhtml_block_salesrule_actions_prepareform事件。但我一直收到错误信息,我不知道为什么?
警告:Mage_Core_Model_App :: dispatchEvent() [mage-core-model-app.dispatchevent]:节点不再存在 /var/www/server/www.site.com/app/code/core/Mage/Core/Model/App.php on 第1249行
这是我模块中config.xml的一部分 - 我没有做错什么吗?
<adminhtml>
<events>
<adminhtml_block_salesrule_actions_prepareform>
<shoppingcartrules>
<class>shoppingcartrules/observer</class>
<method>prepareForm</method>
</shoppingcartrules>
</adminhtml_block_salesrule_actions_prepareform>
</events>
</adminhtml>
答案 0 :(得分:11)
我想通了......我的XML中缺少节点。
<adminhtml>
<events>
<adminhtml_block_salesrule_actions_prepareform>
<observers>
<shoppingcartrules>
<class>shoppingcartrules/observer</class>
<method>prepareForm</method>
</shoppingcartrules>
</observers>
</adminhtml_block_salesrule_actions_prepareform>
</events>
</adminhtml>