Created
January 5, 2016 15:04
-
-
Save dleone81/12c9cbe68b2cef350296 to your computer and use it in GitHub Desktop.
Set status COMPLETE for single order via PHP script
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 | |
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