Reputation: 67
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.
Upvotes: 3
Views: 2054
Reputation: 31
Set this line:
'resource' => 'order_histories',
To this:
'resource' => 'order_histories?sendemail=1',
Upvotes: 3