Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在订单更新中发送电子邮件?_Php_Email_Magento - Fatal编程技术网

Php 如何在订单更新中发送电子邮件?

Php 如何在订单更新中发送电子邮件?,php,email,magento,Php,Email,Magento,我正在使用中介支付,并创建了一种对账方法,以在收到支付中介通知时更改magento中请求的状态 它真的很有效,数据库中的交易状态等等,我的问题是如何向监听订单状态变化的用户发送电子邮件通知 当您手动更改应用程序的状态时,有选项复选框通知客户机,我想要的是相同的东西,只有这样的东西: When you finish updating the status in the database to send the email with the new status something like: &l

我正在使用中介支付,并创建了一种对账方法,以在收到支付中介通知时更改magento中请求的状态

它真的很有效,数据库中的交易状态等等,我的问题是如何向监听订单状态变化的用户发送电子邮件通知

当您手动更改应用程序的状态时,有选项复选框通知客户机,我想要的是相同的东西,只有这样的东西:

When you finish updating the status in the database to send the email with the new status something like:
<?php
   $order = Mage::getModel('sales/order')->load($id);
   $order->sendUpdateOrderEmail($newStatus);
?>
答复:


这适用于$order->sendneworderemailaddhistoric中的admin->$order->addStatusToHistory$status、$comment、$notify;
<?php
   $order = Mage::getModel('sales/order')->load($id);
   $order->sendOrderUpdateEmail($notify, $comment); // $notify is boolean
?>