花魁直播高品质美女在线视频互动社区 - 花魁直播官方版

 歡迎來到素材無憂網(wǎng),按 + 收藏我們
登錄 注冊 退出 找回密碼

ecshop新會員注冊自動發(fā)送郵件通知管理員

時間: 2024-02-25 10:43 閱讀: 作者:素材無憂網(wǎng)

步驟一:更改數(shù)據(jù)庫
用MySQL管理工具找到 ecs_mail_templates表插入一條新會員注冊郵件提醒模板數(shù)據(jù)。
INSERT INTO ecs_mail_templates (template_id, template_code, is_html, template_subject, template_content, last_modify, last_send, type) VALUES(16, 'remind_of_new_reg', 1, '新會員注冊提醒', '


親愛的管理員,您好:

快來看看吧,ECSHOP素材無憂又有新會員注冊了。 /> />----------------------------------------------------------------- />
會員:{$user_name}
/>郵箱:{$email}

管理中心登陸: >http://www.ebingou.cn />
ECSHOP素材無憂小秘書提醒
/>{$send_date}

', 13*********, 0, 'template');
修改商店設置WAP設置選項卡的位置,在其之前增加選項卡"郵件設置"。
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)店信息選項卡移至郵件設置選項卡。
UPDATE ecs_shop_config SET id=901 WHERE code="service_email";
第二步: 更改語言文件。
/languages/zh_cn/admin/mail_template.php中添加:
$_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中均有會員注冊邏輯,所以這兩個文件都要增加郵件提醒代碼。
/flow.php中大概275行:if (register(trim($_POST[‘username’]), trim($_POST[‘password’]), trim($_POST[‘email’])))下增加:
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ā)送郵件通知管理員

標簽: ecshop新會員  
相關文章
推薦文章
模板推薦