Created
May 30, 2016 17:34
-
-
Save thestuntcoder/f46ab7bb55d0db892af863fc16b5b405 to your computer and use it in GitHub Desktop.
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
// get the last order | |
$lastOrderId = $this->_getOnepage()->getCheckout()->getLastOrderId(); | |
$order = Mage::getModel('sales/order')->load($lastOrderId); | |
// Add the comment and save the order (last parameter will determine if comment will be sent to customer) | |
$order->addStatusHistoryComment('This comment is programatically added to last order in this Magento setup'); | |
$order->save(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment