Skip to content

Instantly share code, notes, and snippets.

@drewgillson
Last active December 16, 2015 06:59
Show Gist options
  • Save drewgillson/5395164 to your computer and use it in GitHub Desktop.
Save drewgillson/5395164 to your computer and use it in GitHub Desktop.
<?php
$db = Mage::getSingleton('core/resource')->getConnection('core_read');
$rows = $db->fetchAll("SELECT entity_id FROM catalog_product_entity WHERE type_id = 'simple'");
foreach ($rows as $row) {
Mage::helper('SalesOrderPlanning/ProductAvailabilityStatus')->RefreshForOneProduct($row['entity_id']);
Mage::helper('AdvancedStock/Product_Base')->updateStocksFromProductId($row['entity_id']);
Mage::helper('purchase/Product')->updateProductWaitingForDeliveryQty($row['entity_id']);
Mage::helper('purchase/Product')->updateProductDeliveryDate($row['entity_id']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment