I'm trying to add order history (and change order_state with that) by using prestashop api:
$xml = $this->api->get(array('url' => $url . '/api/order_histories?schema=blank'));
$xml->order_history->id_order_state = 4;
$xml->order_history->id_order = $order_id;
unset( $xml->order_history->id );
unset( $xml->order_history->date_add );
$xml = $this->api->add(array(
'resource' => 'order_histories',
'postXml' => $xml->asXML()
));
It works just fine (order_state is changed) but presta doesn't sending any notification to buyer.
Set this line:
'resource' => 'order_histories',
To this:
'resource' => 'order_histories?sendemail=1',
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With