Skip to content

Instantly share code, notes, and snippets.

@avocadoslab
Created September 19, 2016 20:01
Show Gist options
  • Save avocadoslab/fa67a007a1b6d7e3bee94c9cc09ae344 to your computer and use it in GitHub Desktop.
Save avocadoslab/fa67a007a1b6d7e3bee94c9cc09ae344 to your computer and use it in GitHub Desktop.
Change order status to complete in magento
require 'app/Mage.php';
Mage::app();
$order = Mage::getModel('sales/order')->loadByIncrementId('2323233');
$order->setData('state', "complete");
$order->setStatus("complete");
$history = $order->addStatusHistoryComment('Order was set to Complete by SomethingDigital on 9/19.', false);
$history->setIsCustomerNotified(false);
$order->save();
print_r("done processing");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment