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

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

문제

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.

도움이 되었습니까?

해결책

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

$indexer->rebuild(store_id);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top