Skip to content

Instantly share code, notes, and snippets.

@dleone81
Created January 5, 2016 15:04
Show Gist options
  • Save dleone81/12c9cbe68b2cef350296 to your computer and use it in GitHub Desktop.
Save dleone81/12c9cbe68b2cef350296 to your computer and use it in GitHub Desktop.
Set status COMPLETE for single order via PHP script
<?php
require_once 'app/Mage.php';
umask(0);
Mage::app();
$order_id = '200000832';
$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
$order->setData('state', "complete");
$order->setStatus("complete");
$history = $order->addStatusHistoryComment('Order status changed via script.', false);
$history->setIsCustomerNotified(false);
$order->save();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment