Jump to content

[SOLVED] Order History question


MrBaseball34
 Share

Recommended Posts

I am wanting to change the status of an order from an outside script. It seems to me that doing this:

$new_history = new OrderHistory();
$new_history->id_order = intval($id_order);
$new_history->id_order_state = _PS_OS_PAYMENT_;
$new_history->addWithemail(true);



Makes a new record in the ps_order_history table.
Is this normal behavior or am I doing something wrong?

Do I need to do this as well?

$new_history->changeIdOrderState(_PS_OS_PAYMENT_, $id_order);        

Share this post


Link to post
Share on other sites

  • 5 months later...

Hi,
I'm in trouble with the same topic trying to update order status from an external script.
I'm writing

$new_history->changeIdOrderState(12, $order_id);

but the order doesn't move to status 12.

Where is the issue?
Regards,

Share this post


Link to post
Share on other sites

  • 4 weeks later...

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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More