对于magneto的事件,有一些不想用了,可以禁用掉,然后就不执行了
下面是如果执行的代码,下载模块的etc/config.xml文件中就可以了!
<frontend> <events> <controller_action_predispatch> <observers><log><type>disabled</type></log></observers> </controller_action_predispatch> <events></frontend>
当然,你可以抓取magento的事件,然后放在自己执行的代码,可以如下操作
<frontend> <events> <controller_action_test> <observers> <test> <class>test/testvisitor</class> <method>testinitByRequest</method> </test> </observers> </controller_action_test> .... other events </events></frontend>在你写的这个模块扩展中testvisitor对应的方法testinitByRequest写上你要执行的代码就可以了!

