Created
June 1, 2015 17:44
-
-
Save ryaan-anthony/bddd8f90284c66b6a7a3 to your computer and use it in GitHub Desktop.
Set magento orders to complete.
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'; | |
| $app = Mage::app(); | |
| Mage::register('isSecureArea', true); | |
| Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); | |
| $order = Mage::getModel('sales/order')->loadByIncrementId('100000266'); | |
| $order->setData('state', 'complete'); | |
| $order->setStatus('complete'); | |
| $history = $order->addStatusHistoryComment('Order was set to Complete by our automation tool.', false); | |
| $history->setIsCustomerNotified(false); | |
| $order->save(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment