親愛的管理員,您好:
快來看看吧,ECSHOP素材無憂又有新會員注冊了。
/>
/>-----------------------------------------------------------------
/>
會員:{$user_name}
/>郵箱:{$email}
管理中心登陸:
>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);
將客服郵件地址輸入框從網(wǎng)店信息選項卡移至郵件設置選項卡。
$_LANG['remind_of_new_reg'] = '新會員注冊提醒模板';
/languages/zh_cn/admin/shop_config.php中添加:
$_LANG['cfg_desc']['service_email'] = '用于接收新訂單提醒、新會員注冊提醒等商城運營郵件,多個郵箱請用英文逗號分隔。';
$_LANG['cfg_name']['send_reg_email'] = '新會員注冊時是否給管理員發(fā)送郵件';
$_LANG['cfg_range']['send_reg_email']['0'] = '不發(fā)送郵件';
$_LANG['cfg_range']['send_reg_email']['1'] = '發(fā)送郵件';
$_LANG['cfg_desc']['send_service_email'] = "商城信息中的客服郵件地址或管理員郵件地址不為空時,該選項有效。";
第三步:增加PHP處理邏輯,flow.php和user.php中均有會員注冊邏輯,所以這兩個文件都要增加郵件提醒代碼。
if (register(trim($_POST['username']), trim($_POST['password']), trim($_POST['email'])))
{
/* 用戶注冊成功,如果需要,發(fā)郵件給管理員 */
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默認不支持多個郵件發(fā)送,將逗號分隔的郵件地址分解成數(shù)組,再循環(huán)逐個發(fā)送。
$arrEmail = explode("," ,$_CFG['['service_email']);
foreach($arrEmail as $arrEmailValue)
{
send_mail($_CFG['shop_name'], $arrEmailValue, $tpl['template_subject'], $content, $tpl['is_html']); //發(fā)給管理員
}
}
}
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'])))
{
/* 用戶注冊成功,如果需要,發(fā)郵件給客服和管理員 */
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默認不支持多個郵件發(fā)送,將逗號分隔的郵件地址分解成數(shù)組,再循環(huán)逐個發(fā)送。
$arrEmail = explode("," ,$_CFG['service_email']);
foreach($arrEmail as $arrEmailValue)
{
send_mail($_CFG['shop_name'], $arrEmailValue, $tpl['template_subject'], $content, $tpl['is_html']); //發(fā)給管理員
}
}
}
ecs_header("Location: flow.php?step=consigneen");
exit;
}
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會員發(fā)布,如果侵犯了您的權(quán)益請與我們聯(lián)系,我們將在24小時內(nèi)刪除!謝謝!
轉(zhuǎn)載請注明: ecshop新會員注冊自動發(fā)送郵件通知管理員