I want to know if is there any way to save the status/state of the order after the refund. When i create a credit memo the status of my order changes, i want to remove this change and keep it as it is even after refund, or at least change status to my custom status exp refunded. Any help on this?

Thanks in advance

1 Answer 1


I found the answer so i am posting here for anyone that has the same isue. I tracked the code responsible for this change in :


and there in two places was this line of code:

$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message);

Comment it or change state as you wish.

  • You should never change the Magento core files! At best, any changes you make will be overwritten when you update Magento to install upgrades or security patches, which are released on a regular basis and need to be installed. At worst, future upgrades may fail to install at all since they sometimes diff against the core files during installation. Instead, follow Magento Customization Best Practices and OVERRIDE the behavior via extending a custom version of that class : mediotype.com/commerceacademy/blog/cat/magento-code/post/… Apr 24, 2015 at 20:30
  • The concept of the answer is good but the implementation should reflect best practices....update it based on that article and I'll upvote your reply. Apr 24, 2015 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.