在 Magento 1.7 中,我想在以编程方式将状态更改为已发货后以编程方式触发电子邮件的发送。在下面的代码中,状态已更改,但未发送电子邮件。API 中是否存在错误,或者我使用错误。
function setShipOrder($orderID){
// check if valid order number
try{
$order = $this->soapObject->call($this->sessionId, 'sales_order.info', $orderID);
}
catch (SoapFault $e){
output_error_xml(1600);
}
// try to ship
try{
$newShipmentId = $this->soapObject->call($this->sessionId, 'sales_order_shipment.create', array($orderID, array(), 'Order has been shipped', true, true));
$this->outputOrderSuccessXml("Your order" . $orderID . " was shipped" , $newShipmentId);
}
catch (SoapFault $e){
...
}
}