Php 如何在订单更新中发送电子邮件?
我正在使用中介支付,并创建了一种对账方法,以在收到支付中介通知时更改magento中请求的状态 它真的很有效,数据库中的交易状态等等,我的问题是如何向监听订单状态变化的用户发送电子邮件通知 当您手动更改应用程序的状态时,有选项复选框通知客户机,我想要的是相同的东西,只有这样的东西: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
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
?>