-
-
Save trueparallels/ddc794aac0b0556a594a0324c82546bc to your computer and use it in GitHub Desktop.
magento - fix missing order and invoice grid data
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 | |
include_once 'abstract.php'; | |
class FixOrderGrid extends Mage_Shell_Abstract | |
{ | |
/** | |
* Run script | |
* | |
*/ | |
public function run() | |
{ | |
// repopulate order grid data | |
$orderIds = Mage::getResourceModel('sales/order_collection')->getAllIds(); | |
Mage::getModel('sales/order')->getResource()->updateGridRecords($orderIds); | |
// repopulate invoice grid data | |
$invoiceIds = Mage::getResourceModel('sales/order_invoice_collection')->getAllIds(); | |
Mage::getModel('sales/order_invoice')->getResource()->updateGridRecords($invoiceIds); | |
} | |
} | |
$shell = new FixOrderGrid(); | |
$shell->run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment