亲爱的管理员,您好:
快来看看吧,ECSHOP素材无忧又有新会员注册了。
/>
/>-----------------------------------------------------------------
/>
会员:{$user_name}
/>邮箱:{$email}
管理中心登陆:
href="http://www.ebingou.cn/">http://www.ebingou.cn
/>
ECSHOP素材无忧小秘书提醒
/>{$send_date}
UPDATE ecs_shop_config SET id=id+1 WHERE id=9;
UPDATE ecs_shop_config SET id=id+100, parent_id=parent_id+1 WHERE parent_id=9;
INSERT INTO eyo_shop_config (id, parent_id, code, type, store_range, store_dir, value, sort_order) VALUES
(910, 9, 'send_reg_email', 'select', '1,0', '', '1', 1);
将客服邮件地址输入框从网店信息选项卡移至邮件设置选项卡。
$_LANG['remind_of_new_reg'] = '新会员注册提醒模板';
/languages/zh_cn/admin/shop_config.php中添加:
$_LANG['cfg_desc']['service_email'] = '用于接收新订单提醒、新会员注册提醒等商城运营邮件,多个邮箱请用英文逗号分隔。';
$_LANG['cfg_name']['send_reg_email'] = '新会员注册时是否给管理员发送邮件';
$_LANG['cfg_range']['send_reg_email']['0'] = '不发送邮件';
$_LANG['cfg_range']['send_reg_email']['1'] = '发送邮件';
$_LANG['cfg_desc']['send_service_email'] = "商城信息中的客服邮件地址或管理员邮件地址不为空时,该选项有效。";
第三步:增加PHP处理逻辑,flow.php和user.php中均有会员注册逻辑,所以这两个文件都要增加邮件提醒代码。
if (register(trim($_POST['username']), trim($_POST['password']), trim($_POST['email'])))
{
/* 用户注册成功,如果需要,发邮件给管理员 */
if ($GLOBALS['_CFG']['send_reg_email'] == '1')
{
$tpl = get_mail_template('remind_of_new_reg');
$smarty->assign('shop_name', $_CFG['shop_name']);
$smarty->assign('send_date', date($_CFG['time_format']));
$smarty->assign('user_name', trim($_POST['username']));
$smarty->assign('email', trim($_POST['email']));
$content = $smarty->fetch('str:' . $tpl['template_content']);
if($_CFG['service_email'] != '')
{
//ECSHOP默认不支持多个邮件发送,将逗号分隔的邮件地址分解成数组,再循环逐个发送。
$arrEmail = explode("," ,$_CFG['['service_email']);
foreach($arrEmail as $arrEmailValue)
{
send_mail($_CFG['shop_name'], $arrEmailValue, $tpl['template_subject'], $content, $tpl['is_html']); //发给管理员
}
}
}
ecs_header("Location: flow.php?step=consigneen");
exit;
}
/user.php中约235行:
/* 注册会员邮件确认通知 */
$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']);
下面增加:
if (register(trim($_POST['username']), trim($_POST['password']), trim($_POST['email'])))
{
/* 用户注册成功,如果需要,发邮件给客服和管理员 */
if ($GLOBALS['_CFG']['send_reg_email'] == '1')
{
$tpl = get_mail_template('remind_of_new_reg');
$smarty->assign('shop_name', $_CFG['shop_name']);
$smarty->assign('send_date', date($_CFG['time_format']));
$smarty->assign('user_name', trim($_POST['username']));
$smarty->assign('email', trim($_POST['email']));
$content = $smarty->fetch('str:' . $tpl['template_content']);
if($_CFG['service_email'] != '')
{
//ECSHOP默认不支持多个邮件发送,将逗号分隔的邮件地址分解成数组,再循环逐个发送。
$arrEmail = explode("," ,$_CFG['service_email']);
foreach($arrEmail as $arrEmailValue)
{
send_mail($_CFG['shop_name'], $arrEmailValue, $tpl['template_subject'], $content, $tpl['is_html']); //发给管理员
}
}
}
ecs_header("Location: flow.php?step=consigneen");
exit;
}
版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!
转载请注明: ecshop新会员注册自动发送邮件通知管理员