Magento 哪个事件被称为?需要建立一个观察者
我需要在 Magento 中创建一个观察者,用于侦听有人重新索引目录搜索索引时调用的事件。
那么,当有人索引目录搜索索引时会调用哪个事件?谢谢?
编辑: 我正在看这个事件: Catalogindex_plain_reindex_after
这是正确的吗?
http://www.magentocommerce.com/wiki/5__-_modules_and_development/reference/events
I need to create an observer in Magento that listens for the event that is called when someone re-indexes the Catalog Search Index.
So which event is called when someone indexes Catalog Search Index? Thanks?
Edit:
I am looking at the event:
catalogindex_plain_reindex_after
Would this be the correct one?
http://www.magentocommerce.com/wiki/5_-_modules_and_development/reference/events
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您需要某个页面上的观察者,您可以取消注释index.php中的Varien_Profiler并在配置的开发人员部分中启用它。启用后,您应该会在页面底部看到一个表格,其中包含该页面上发生的所有情况。查找
调度事件:
。If you need an observer on a certain page, you can uncomment the Varien_Profiler in index.php and enable it in the Developer section of the config. Once it is enabled you should see a table on the bottom of your page with everything that happened on that page. Look for
DISPATCH EVENT:
.我建议从命令行运行这个 grep 并构建一个事件 txt 文件,其中包含您可以挂钩的可用事件。您链接的该列表可能相当过时。
grep -r Mage::dispatchEvent /path/to/your/Magento/* >事件.txt
I would recommend running this grep from command line and building out an events txt file of available events you can hook into. That list may be pretty dated you linked.
grep -r Mage::dispatchEvent /path/to/your/Magento/* > events.txt