Jump to content

Right way to change Order History


Recommended Posts

Hello,

i have issue with changing Order History from backend.

 

Example
I have order with FAILed payment so i let he customer to pay again. This is no problem.

After payment i get notification with result - OK.

 

So i want to change order status from "Payment FAIL" to "Payment OK"

 

I have used this code 

 

$history = new OrderHistory();
$history->id_order = $orderId;
$history->changeIdOrderState($newStatusId, $orderId);
 
After this in admin i can see the new status but it has no record in order history and on front end there is always the first status (FAIL) with no change.
 
Can someone help me what have i done wrong? What is the right way to do this?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...