Created
April 16, 2013 11:09
-
-
Save drewgillson/5395114 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
class Lot_Common_Helper_Cli_Erp extends Lot_Common_Helper_Cli_Data { | |
public function refreshStockStatusAsync($entity_ids) { | |
foreach ($entity_ids as $entity_id) { | |
try { | |
Mage::helper('SalesOrderPlanning/ProductAvailabilityStatus')->RefreshForOneProduct($entity_id); | |
Mage::helper('AdvancedStock/Product_Base')->updateStocksFromProductId($entity_id); | |
Mage::helper('purchase/Product')->updateProductWaitingForDeliveryQty($entity_id); | |
Mage::helper('purchase/Product')->updateProductDeliveryDate($entity_id); | |
} | |
catch (PDOException $e) { | |
echo "Product with entity_id $entity_id was unable to be refreshed because of a MySQL exception"; | |
echo $e->getMessage(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment