api - Magento 1.7 - send email to customer after chanfing status to shipped -
in magento 1.7, programatically trigger sending of email after programatically changing status shipped. in code below, status changed email not sent. there bug in api, or maybe using wrong.
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 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 . " shipped" , $newshipmentid); } catch (soapfault $e){ ... } }
make sure enable email notification new shipments:
system -> configuration -> sales -> sales emails -> shipment
Comments
Post a Comment