如何在 opencart 中的订单电子邮件中添加额外的文本

How to add extra text in order e-mail in opencart

您好,我想在我的 Opencart 商店成功订购后更改电子邮件回复。

我只想在电子邮件中添加更多文本。

据我所知我需要进去 :

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

并更改那里的代码,但是当我这样做时,没有任何变化。

我很抱歉我的英语不好。

您不应该进入 .tpl 文件

转到这里:

/catalog/language/bulgarian/mail/order.php

你会发现这一行:

$_['text_new_greeting']         = "Your text HERE";

更改“”标记内的文字。

那是 Opencart 1.x(我不确定 2.0)

  1. 进入语言文件/catalog/language/*/mail/order.php.

  2. 在文件末尾,粘贴此 $_['text_new'] = "Your Text";。 模型 catalog/model/checkout/order.php 自动调用语言文件,因此您不必调用它,但您必须在模型中声明变量。浏览它并查看邮件变量的生成位置。在那里添加你的变量。 $data['text_new'] = $this->language->get('text_new');

  3. 转到 catalog/view/theme/default/template/mail/order.tpl 并在需要的地方调用变量 $text_new。

就是这样。