[英]Prestashop 1.6 - Disable Payment Accepted email when order amount is 0(zero)
我的要求是,当订单金额为零时,禁止向客户发送电子邮件。
我是Prestashop的新手,无法理解我必须在哪个类或控制器中放置此条件。 我发现了一些参考,例如: https : //www.prestashop.com/forums/topic/175669-disable-order-emails/但这是用于禁用所有电子邮件。
任何帮助将被申请。 提前致谢。
在Classs / PaymentModule.Php中
您需要在这些行上方添加条件。 (行号在791附近)。 此部分将确认电子邮件发送给客户。
if (Validate::isEmail($this->context->customer->email))
Mail::Send(
(int)$order->id_lang,
'order_conf',
Mail::l('Order confirmation', (int)$order->id_lang),
$data,
$this->context->customer->email,
$this->context->customer->firstname.' '.$this->context->customer->lastname,
null,
null,
$file_attachement,
null, _PS_MAIL_DIR_, false, (int)$order->id_shop
);
条件可以像
if($order->total_paid>0)
希望能帮助到你 !!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.