0

在 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){                   
                ...
            }        
    }    
4

1 回答 1

0

确保为新货件启用电子邮件通知:

系统 -> 配置 -> 销售 -> 销售电子邮件 -> 发货

于 2013-09-01T07:07:53.223 回答