您现在的位置是:首页 > 教程 > ecshop商城教程ecshop商城教程

ecshop会员注册自动发送邮件欢迎信息修改方法

简务2024-01-16 20:27:17ecshop商城教程已有人查阅

导读 步: 数据库->ecs_mail_templates邮件模板表中插入一条注册发送邮件的记录。INSERT INTO ecs_mail_templates

步骤一: 数据库->ecs_mail_templates邮件模板表中插入一条注册发送邮件的记录。
INSERT INTO ecs_mail_templates (template_id, template_code, is_html, template_subject, template_content, last_modify, last_send, type) VALUES ('', 'send_reg', '1', 'ECSHOP代码号-欢迎信息', '尊敬的{$user_name},感谢您注册成为{$shop_name}的会员! <br />请您在发表言论时,遵守当地法律法规。<br />
如果您有什么疑问可以联系管理员,Email: 123546@qq.com。<br />{$shop_name}<br />{$send_date}', '13888888888', '0', 'template');
第二步:在语言文件 languages/zh_cn/admin/mail_template.php /* 模板描述 */下添加
$_LANG['send_reg'] = '欢迎信息模板';
第三步:增加PHP处理逻辑
flow.php和user.php中均有会员注册逻辑,所以这两个文件都要增加邮件发送代码
flow.php 大概286行->elseif (!empty($_POST['act']) && $_POST['act'] == 'signup') 里面增加如下代码:
/* 注册会员邮件欢迎 */$tpl = get_mail_template('send_reg');$smarty->assign('shop_name', $_CFG['shop_name']);$smarty->assign('send_date', date($_CFG['time_format']));$smarty->assign('user_name',$username);$content = $smarty->fetch('str:' . $tpl['template_content']);send_mail($_CFG['shop_name'], $email, $tpl['template_subject'], $content, $tpl['is_html']);
user.php 大概234行->/* 写入密码提示问题和答案 */这个判断的下面增加如下代码:
/* 注册会员邮件欢迎 */$tpl = get_mail_template('send_reg');$smarty->assign('shop_name', $_CFG['shop_name']);$smarty->assign('send_date', date($_CFG['time_format']));$smarty->assign('user_name',$username);$content = $smarty->fetch('str:' . $tpl['template_content']);send_mail($_CFG['shop_name'], $email, $tpl['template_subject'], $content, $tpl['is_html']);

本文标签:

很赞哦! ()

留言与评论 (共有 条评论)
验证码:

本栏推荐

相关标签