在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){
...
}
}
答案 0 :(得分:0)
确保为新货件启用电子邮件通知:
系统 - >配置 - >销售 - >销售电子邮件 - >装运