开发者

Magento which event is called? Need to build an observer

开发者 https://www.devze.com 2023-03-27 08:57 出处:网络
I need to create an observer in Magento that listens for the event that is called when someone re-indexes the Catalog Search Index.

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


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:.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消