我尝试使用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不会向买方发送任何通知。
答案 0 :(得分:3)
设置此行:
'resource' => 'order_histories',
对此:
'resource' => 'order_histories?sendemail=1',