Skip to content

Instantly share code, notes, and snippets.

@jreinke
Created May 12, 2014 12:54
Show Gist options
  • Save jreinke/a947ec96f7e58e618dab to your computer and use it in GitHub Desktop.
Save jreinke/a947ec96f7e58e618dab to your computer and use it in GitHub Desktop.
Magento: set index as update required
<?php
if (Mage::helper('catalog/product_flat')->isEnabled()) {
Mage::getSingleton('index/indexer')
->getProcessByCode(Mage_Catalog_Helper_Product_Flat::CATALOG_FLAT_PROCESS_CODE)
->changeStatus(Mage_Index_Model_Process::STATUS_REQUIRE_REINDEX);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment