php替换邮件模板,修改OpenCart发送电子邮件的模板

大多开源电子商务系统都具有发邮件的功能,如在会员注册成功后或会员成功下定单后,系统会自动向会员的邮箱里发送一封邮件,opencart当然也不例外。但和magento相比,OpenCart系统发新不能像Magento那样方便的在后台修改e-mail的内容模板,我们应该怎么办呢?

唯一的办法就是修改语言文件来达到修改电子邮件内容的目的,我们以会员注册成功后发送邮件为例子,以英文语言包为例,默认的英文邮件就在

catalog/language/english/mail/ccount_create.php

文件中.内容如下

// Text

$_['text_subject']  = '%s - Thank you for registering';

$_['text_welcome']  = 'Welcome and thank you for registering at %s!';

$_['text_login']    = 'Your account has now been created and you can log in by using your email address and password by visiting our website or at the following URL:';

$_['text_approval'] = 'Your account must be approved before you can login. Once approved you can log in by using your email address and password by visiting our website or at the following URL:';

$_['text_services'] = 'Upon logging in, you will be able to access other services including reviewing past orders, printing invoices and editing your account information.';

$_['text_thanks']   = 'Thanks,';

其中的内容不需要做解释了,一目了然,需要注意的是%s是变量,不懂的可以对应着邮件修改,以此类推,此文件夹下的其他文件也是对应的邮件模板,如订单等,并且支持html语法。

(责任编辑:最模板)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值