Skip to content

Instantly share code, notes, and snippets.

@jonatanaxe
Last active August 2, 2018 13:19
Show Gist options
  • Select an option

  • Save jonatanaxe/ba2b55d0de71f251f5338329c4a7d698 to your computer and use it in GitHub Desktop.

Select an option

Save jonatanaxe/ba2b55d0de71f251f5338329c4a7d698 to your computer and use it in GitHub Desktop.
Problema com reindex do magento 1 /reindex.php
<?php
//Loads the magento administration environment.
require_once 'app/Mage.php';
$app = Mage::app('admin');
umask(0);
//To reindex the processes that require your IDs
$ids = array(1,2,3,4,5,6,7,8,9);
foreach($ids as $id){
//Upload each process through your ID
try{
$process = Mage::getModel('index/process')->load($id);
$process->reindexAll();
echo "Indexing for Process ID # ".$id." Done<br />";
}
catch(Exception $e){
echo $e->getMessage();
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment