Magento – Dont change status/state after refund

creditmemorefund

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

Best Answer

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.

Related Topic