前">
ecshop注冊送紅包插件安裝說明

ecshop注冊送紅包插件安裝說明

ID:12328886

大小:333.50 KB

頁數(shù):3頁

時間:2018-07-16

ecshop注冊送紅包插件安裝說明_第1頁
ecshop注冊送紅包插件安裝說明_第2頁
ecshop注冊送紅包插件安裝說明_第3頁
資源描述:

《ecshop注冊送紅包插件安裝說明》由會員上傳分享,免費在線閱讀,更多相關內(nèi)容在行業(yè)資料-天天文庫。

1、頂億網(wǎng)Ecshop注冊送紅包插件安裝說明安裝過程:一、在ecshop后臺增加一種紅包類型二、后臺紅包列表里會增加一種紅包類型:三、記住注冊送紅包類型的編號,后面要用到四、修改includes/lib_common.php,在其文件最后?>前加一個函數(shù)functionsend_register_bonus($user_id,$bid){$user_info=$GLOBALS['db']->getRow("selectuser_name,emailfrom".$GLOBALS['ecs']->table('users'

2、)."whereuser_id='$user_id'");$bonus_type=$GLOBALS['db']->getRow("SELECT*FROM".$GLOBALS['ecs']->table('bonus_type')."WHEREtype_id='$bid'");if(!$bonus_type)returnfalse;$tpl=get_mail_template('send_bonus');if(!$tpl)returnfalse;$today=local_date($_CFG['date_format

3、']);/*發(fā)送郵件通知*/$GLOBALS['smarty']->assign('user_name',$user_info['user_name']);$GLOBALS['smarty']->assign('shop_name',$GLOBALS['_CFG']['shop_name']);$GLOBALS['smarty']->assign('send_date',$today);$GLOBALS['smarty']->assign('sent_date',$today);$GLOBALS['smarty']

4、->assign('count',1);$GLOBALS['smarty']->assign('money',price_format($bonus_type['type_money']));$content=$GLOBALS['smarty']->fetch('str:'.$tpl['template_content']);$time=time();$content=addslashes($content);$template_id=$GLOBALS['db']->getOne("SELECTtemplate_i

5、dFROM".$GLOBALS['ecs']->table('mail_templates')."WHEREtemplate_code='send_bonus'");$sql="INSERTINTO".$GLOBALS['ecs']->table('email_sendlist')."(email,template_id,email_content,pri,last_send)VALUES('$user_info[email]',$template_id,'$content',1,'$time')";$GLOBAL

6、S['db']->query($sql);/*向會員紅包表錄入數(shù)據(jù)*/$sql="INSERTINTO".$GLOBALS['ecs']->table('user_bonus')."(bonus_type_id,bonus_sn,user_id,used_time,order_id,emailed)"."VALUES('$bid',0,'$user_id',0,0,".BONUS_MAIL_SUCCEED.")";$GLOBALS['db']->query($sql);}如截圖所示五、最后修改lib_passpor

7、t.php的register函數(shù)增加:/***注冊送紅包**/send_register_bonus($_SESSION['user_id'],1);如圖所示開發(fā)人:php-lifeqq:40499756email:ydhcxh@126.com網(wǎng)址:http://ecshop.topit.cn功能說明見:一分鐘實現(xiàn)ecshop注冊送紅包

當前文檔最多預覽五頁,下載文檔查看全文

此文檔下載收益歸作者所有

當前文檔最多預覽五頁,下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學公式或PPT動畫的文件,查看預覽時可能會顯示錯亂或異常,文件下載后無此問題,請放心下載。
2. 本文檔由用戶上傳,版權(quán)歸屬用戶,天天文庫負責整理代發(fā)布。如果您對本文檔版權(quán)有爭議請及時聯(lián)系客服。
3. 下載前請仔細閱讀文檔內(nèi)容,確認文檔內(nèi)容符合您的需求后進行下載,若出現(xiàn)內(nèi)容與標題不符可向本站投訴處理。
4. 下載文檔時可能由于網(wǎng)絡波動等原因無法下載或下載錯誤,付費完成后未能成功下載的用戶請聯(lián)系客服處理。