資源描述:
《ecshop買贈活動插件.docx》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、后臺部分1.在admin/includes/inc_menu.php增加$modules['03_promotion']['16_progoods_list']='maizeng.php?act=list';2.在admin/includes/inc_priv.php中增加$purview['16_progoods_list']='maizeng';3.在languages/zh_cn/admin/common.php增加$_LANG['16_progoods_list']='買贈活動';4.把maizeng.ph
2、p放入admin5.在admin/templates中放入maizeng_info.htm6.在admin/templates中放入maizeng_list.htm7.在admin/templates中放入maizeng_updet.htm8.把jquery-3.2.1.js庫文件放在admin/js內(nèi)9.新建一個(gè)數(shù)據(jù)表,表名ecc_maizeng_huodongPC端部分1.在根目錄下goods.php第215行左右添加以下代碼$sqlw='SELECTm.huodong_name'.'FROM'.$GLOBAL
3、S['ecs']->table('goods').'ASg'.'LEFTJOIN'.$GLOBALS['ecs']->table('maizeng_huodong').'ASmONg.goods_name=m.goods_names'."WHEREg.goods_id='$goods_id'";$resw=$GLOBALS['db']->getAll($sqlw);$smarty->assign('resw',$resw);2.在根目錄下themes/當(dāng)前所用模板/goods.dwt第152行左右添加以下代碼
4、class="clearfix"style="width:100%">{foreachfrom=$reswitem=list}{$list.huodong_name}{/foreach}
3.打開根目錄下includes使用文件替換lib_order.php文件4.復(fù)制并替換根目錄下flow.php文件5.打開數(shù)據(jù)表ecs_cart添加表字段↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓6.將flow
5、.dwt放入themes/模板層/default內(nèi).(沒有模板的直接放入themes/default內(nèi)7.修改themes/模板層/default/user_transaction.dwt第800行左右在{$lang.number}后添加參與活動第824行左右把{$goods.goods_number}修改為{$goo
6、ds.goods_numbers}并在{$goods.goods_numbers}后面復(fù)制粘貼以下代碼{$goods.huodong_name}8.修改includes/lib_order.php找到order_goods方法將里面$sql="SELECTrec_id,goods_id,goods_name,goods_attr_id,goods_sn,ma
7、rket_price,"."goods_price,goods_attr,is_real,parent_id,is_gift,"."goods_priceASsubtotal,extension_code,huodong_name"."FROM".$GLOBALS['ecs']->table('order_goods')."WHEREorder_id='$order_id'";修改為$sql="SELECTrec_id,goods_id,goods_name,goods_attr_id,goods_sn,marke
8、t_price,(goods_number+goumai)ASgoods_numbers,goods_number,"."goods_price,goods_attr,is_real,parent_id,is_gift,"."goods_priceASsubtotal,extension_code,huodong_name"."FROM".$GLOBALS[