我遵循帮助指南将trustpilot的SFA集成到prestashop中,但他们的指南是基于发送订单确认。当发送订单确认时,trustpilot服务接收密件抄送电子邮件,并将该电子邮件添加到发送队列以请求审查。问题可能是:
1)订单已完成但付款失败>邮件已发送2)订单已完成并已付款但客户想要删除订单>电子邮件已发送
因此,解决方案是当订单达到发货状态时发送密件抄送电子邮件。当backoffice操作员手动更改发货状态时,客户将收到发货的模板电子邮件。
我不是prestashop重写和编程方面的专家,所以我尝试像这样重写mail.php类:
<?php
class Mail extends MailCore
{
public static function Send($id_lang, $template, $subject, $template_vars, $to,
$to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null,
$template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null, $bcc = null, $reply_to = null)
{
// add trustpilot SFA 2.0
if($template == 'shipped')
{
$bcc->addBcc('*********@invite.trustpilot.com');
}
// send to customer
$ret = parent::Send($id_lang, $template, $subject, $template_vars, $to, $to_name, $from, $from_name, $file_attachment, $mode_smtp, $template_path, $die, $id_shop, $bcc, $reply_to);
return $ret;
}
?>我不知道它是否正确,但在制造混乱之前,我希望得到任何帮助:)
谢谢
https://stackoverflow.com/questions/44701456
复制相似问题