How can I programmatically rebuild the Magento product flat data for a single, specified store view?

StackOverflow https://stackoverflow.com/questions/16461921

Pergunta

I'm running a multi-store installation of Magento and I've reached the point where my manual product imports and the subsequent index rebuild is taking too long. I want to stagger the jobs but need to know how to isolate the rebuilding of the indeces on a per-site basis.

Foi útil?

Solução

$indexer = Mage::getResourceModel('catalog/product_flat_indexer')
/* @var $indexer Mage_Catalog_Model_Resource_Product_Flat_Indexer */

$indexer->rebuild(store_id);
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top