Override magento Mage_Sales_Model_Order using or Copy
app/code/core/Mage/Sales/Model/Order.php to
app/code/local/Mage/Sales/Model/Order.php add define new event on _setStatus function
protected function _setState($state, $status = false, $comment = '', $isCustomerNotified = null, $shouldProtectState = false) { Mage::dispatchEvent('sales_order_status_before', array('order' => $this, 'state' => $state, 'status' => $status, 'comment' => $comment, 'isCustomerNotified' => $isCustomerNotified, 'shouldProtectState' => $shouldProtectState)); // attempt to set the specified state if ($shouldProtectState) { if ($this->isStateProtected($state)) { Mage::throwException( Mage::helper('sales')->__('The Order State "%s" must not be set manually.', $state) ); } } $this->setData('state', $state); // add status history if ($status) { if ($status === true) { $status = $this->getConfig()->getStateDefaultStatus($state); } $this->setStatus($status); $history = $this->addStatusHistoryComment($comment, false); // no sense to set $status again $history->setIsCustomerNotified($isCustomerNotified); // for backwards compatibility } Mage::dispatchEvent('sales_order_status_after', array('order' => $this, 'state' => $state, 'status' => $status, 'comment' => $comment, 'isCustomerNotified' => $isCustomerNotified, 'shouldProtectState' => $shouldProtectState)); return $this; } using two sales_order_status_after and sales_order_status_before you can do your requirement
or best way to do this sales_order_save_after and in this observer if
you get old value then try
$oldstatus=$order->getOrigData('status'); $Newstatus=$order->getData('status'); http://stackoverflow.com/questions/8182009/get-product-changes/8184430#8184430https://stackoverflow.com/questions/8182009/get-product-changes/8184430#8184430