Created
February 13, 2017 19:01
-
-
Save gamort/5dc5e16bdec00a8bb3b922fc463af17c to your computer and use it in GitHub Desktop.
Forces Magento EE to reindex all products
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once __DIR__ . "/../app/Mage.php"; | |
Mage::app(); | |
$tables = [ | |
'catalog_category_product_cat', | |
'catalog_category_product_index', | |
'cataloginventory_stock_status', | |
'catalog_product_index_price' | |
]; | |
foreach ($tables as $table) { | |
/* @var $client Enterprise_Mview_Model_Client */ | |
$client = Mage::getModel('enterprise_mview/client'); | |
$client->init($table); | |
$metadata = $client->getMetadata(); | |
$metadata->setInvalidStatus(); | |
$metadata->setVersionId(''); | |
$metadata->save(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment