2

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

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 :

app/code/core/Mage/Sales/Model/Order/Payment.php

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.

2
  • 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/… Commented 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. Commented Apr 24, 2015 at 20:34

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.