當前位置:名人名言大全網 - 端午節短信 - 如何讓ECSHOP下單並向客戶發送電子郵件?

如何讓ECSHOP下單並向客戶發送電子郵件?

發現於flow.php。

if($ _ CFG【‘send _ service _ email‘】& amp;& amp$ _ CFG【‘service _ email‘】!= '')

{

$ TPL = get _ mail _ template(‘remind _ of _ new _ order‘);

$ smarty-& gt;assign(‘order‘,$ order);

$ smarty-& gt;assign(‘goods _ list‘,$ cart _ goods);

$ smarty-& gt;assign(‘商店名稱‘,$ _ CFG【‘商店名稱‘】);

$ smarty-& gt;assign(‘send _ date‘,date($ _ CFG【‘time _ format‘】));

$ content = $ smarty-& gt;fetch(‘str:‘。$ TPL【‘template _ content‘】);

send _ mail($ _ CFG【‘shop _ name‘】,$ _ CFG【‘service _ email‘】,$ TPL【‘template _ subject‘】,$content,$ TPL【‘is _ html‘】);

}

在上面代碼的底部添加

if($收貨人【email】!= '')

{

$ TPL = get _ mail _ template(‘order _ confirm‘);

$ smarty-& gt;assign(‘order‘,$ order);

$ smarty-& gt;assign(‘goods _ list‘,$ cart _ goods);

$ smarty-& gt;assign(‘商店名稱‘,$ _ CFG【‘商店名稱‘】);

$ smarty-& gt;assign(‘send _ date‘,date($ _ CFG【‘time _ format‘】));

$ content = $ smarty-& gt;fetch(‘str:‘。$ TPL【‘template _ content‘】);

send _ mail($ _ CFG【‘shop _ name‘】,$收貨人【email】,$ TPL【‘template _ subject‘】,$content,$ TPL【‘is _ html‘】);

}

然後在後臺系統中設置-& gt;存儲設置-& gt;購物流程-& gt;確認訂單時選擇發送郵件。