php 如何根据我们的意愿更改 opencart 订单电子邮件内容?是否可以?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11932675/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 02:29:16  来源:igfitidea点击:

How can i change opencart order email content as our wish ? is it possible?

phphtmlopencart

提问by Naveenbos

Can I change the content of order email, which file it exactly refers? This is a confirmation of an online transaction placed with ######. The AuthOnly transaction totaled $171.90and will be processed to your account.

我可以更改订单电子邮件的内容,它确切指的是哪个文件?这是对使用###### 进行的在线交易的确认。AuthOnly 交易总计$171.90并将处理到您的帐户。

Order Number  : 10372    Approval Code : 321321 This content to This

ORDER CONFIRMATION
SUBJECT:
? Your host.com order #XXXXXXX
EMAIL MESSAGE:
? Howdy, (customer name) :
Thank you for ordering from #### We received your order (XXXXXXXX) on (00/00/00). Your work is currently being handled with the utmost care by one of the crew members. We will let you know when it's on its way! Please visit us again soon.

Your order includes the following item(s):

Description – product
Quantity & Price – 1 @ .99
Shipping Method – Standard FREE

Subtotal – .99
Sales Tax – $ 2.10

Order Total – .09

Over & out,
the SSSSSS crew

thank you!

回答by Tohid

Yes of course it's possible. You can modify the content by editing the following template file:

是的,当然有可能。您可以通过编辑以下模板文件来修改内容:

/catalog/view/theme/default/template/mail/order.tpl

(assuming that you are using the default template)

(假设您使用的是默认模板)

But if you want to modify the subject and other stuff, you'll need to edit the order Model file:

但是如果你想修改主题和其他东西,你需要编辑订单模型文件:

/catalog/model/checkout/order.php

then find

然后找到

$mail->setSubject($subject);

and set the $subject to whatever you want :)

并将 $subject 设置为您想要的任何内容:)

回答by Sudhanshu

You can do the changes by visiting the following model/view files.

您可以通过访问以下模型/视图文件来进行更改。

References are as:

参考资料如下:

  1. ..\catalog\view\theme\default\template\mail\order.tpl (to doinvoice template structural or data updates)

  2. ..\catalog\model\checkout\order.php (to retrieve/send any data value to order invoice template.)

  3. ..\catalog\language\english\mail\order.php (to add more language variables or any custom update.)

  1. ..\catalog\view\theme\default\template\mail\order.tpl(做发票模板结构或数据更新)

  2. ..\catalog\model\checkout\order.php(检索/发送任何数据值以订购发票模板。)

  3. ..\catalog\language\english\mail\order.php(添加更多语言变量或任何自定义更新。)

Hope this is useful.

希望这是有用的。

Thanks!

谢谢!

回答by MRRaja

if you just want to change powered by link then go to

如果您只想更改由链接提供支持,请转到

catalog\language\english\mail\order.php

and change it.

并改变它。