require 'app/Mage.php';
Mage::app('admin')->setUseSessionInUrl(false);
$orderIds=Array = array('100000001','100000002','100000004','200000002');
for($cnt=0;$cnt<count($orderIdsArray);$cnt++)
{
try
{
$OrderId=$orderIdsArray[$cnt];
Mage::getModel('sales/order')->loadByIncrementId($OrderId)->delete();
echo "Order #".$OrderId ." is removed"."<br />";
}
catch(Exception $e)
echo 'Error: '.$e->getMessage().'<br />';
}
}
Mage::app('admin')->setUseSessionInUrl(false);
$orderIds=Array = array('100000001','100000002','100000004','200000002');
for($cnt=0;$cnt<count($orderIdsArray);$cnt++)
{
try
{
$OrderId=$orderIdsArray[$cnt];
Mage::getModel('sales/order')->loadByIncrementId($OrderId)->delete();
echo "Order #".$OrderId ." is removed"."<br />";
}
catch(Exception $e)
echo 'Error: '.$e->getMessage().'<br />';
}
}
No comments:
Post a Comment