user404781
user404781

Reputation: 67

Prestashop api - creating order history doesn't send e-mail

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

Answers (1)

baskettcase
baskettcase

Reputation: 31

Set this line:

'resource' => 'order_histories',

To this:

'resource' => 'order_histories?sendemail=1',

Upvotes: 3

Related Questions