1 Answer
update order Items qty programmatically.
please create order.php in magento root file and its run www.domain.com/order.php
<?php
require_once('../app/Mage.php');
umask(0);
Mage::app();
$order_id = 1234; //use your own order id
$order = Mage::getModel("sales/order")->load($order_id); //load order by order id
$ordered_items = $order->getAllItems();
foreach($ordered_items as $item){ //item detail
$item->setQtyOrdered($item->getQtyOrdered() - 1)->save();
}
$order->setStatus("complete");
$change = $order->addStatusHistoryComment('Order was set to Complete by our automation tool.', false);
$change->setIsCustomerNotified(false);
$order->save();
?>