Last active
November 16, 2017 00:28
-
-
Save jreinke/537f01774f90ce4e1eef to your computer and use it in GitHub Desktop.
Magento: Disable flat catalog product on the fly
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 | |
/** @var Mage_Catalog_Helper_Product_Flat $helper */ | |
$process = Mage::helper('catalog/product_flat')->getProcess(); | |
$status = $process->getStatus(); | |
$process->setStatus(Mage_Index_Model_Process::STATUS_RUNNING); | |
/** @var $collection Mage_Catalog_Model_Resource_Product_Collection */ | |
$collection = Mage::getResourceModel('catalog/product_collection'); // Use EAV tables | |
// ... custom stuff | |
$process->setStatus($status); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment