0

I need to hook into Magento and run some code after "Catalog URL Rewrites" has been re-indexed.

I've looked for a single event to hook into but cannot find any answers. I know how to set-up the observer etc, I just literally need the event to watch, and fire my code afterwards.

I've logged the dispatch event to see what is loaded when re-indexing, but unless I'm'm mistaken, no single event fires relating to the Catalog URL Rewrites.

Anyone know which event would be best?

0

I do not think there is an event that will cover all catalog rewrites (i.e. category, product and normal urls) but you could cover all three with the following events.

after_reindex_process_catalog_url_category
after_reindex_process_catalog_url_product
after_reindex_process_url_redirect

These are called after each index is completed and is fired via.

Mage::dispatchEvent('after_reindex_process_' . $this->getIndexerCode());

Where the indexer code is one of the following.

cataloginventory_stock
catalog_product_price
catalog_url_category
catalog_url_product
url_redirect
catalog_category_product
catalogsearch_fulltext
tag_summary
catalog_product_attribute

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.