资源描述:
《ecshop买赠活动插件.docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
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内9.新建一个数据表,表名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/当前所用模板/goods.dwt第152行左右添加以下代码
4、class="clearfix"style="width:100%">{foreachfrom=$reswitem=list}{$list.huodong_name}{/foreach}
3.打开根目录下includes使用文件替换lib_order.php文件4.复制并替换根目录下flow.php文件5.打开数据表ecs_cart添加表字段↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓6.将flow
5、.dwt放入themes/模板层/default内.(没有模板的直接放入themes/default内7.修改themes/模板层/default/user_transaction.dwt第800行左右在{$lang.number}后添加参与活动第824行左右把{$goods.goods_number}修改为{$goo
6、ds.goods_numbers}并在{$goods.goods_numbers}后面复制粘贴以下代码{$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[