Prestashop api - 创建订单历史记录不会发送电子邮件

时间:2014-03-18 17:32:42

标签: web-services api prestashop

我尝试使用prestashop api添加订单历史记录(并使用它更改order_state):

$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()
));

它运作正常(order_state已更改)但presta不会向买方发送任何通知。

1 个答案:

答案 0 :(得分:3)

设置此行:

'resource' => 'order_histories',

对此:

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