ECSHOP商品批发插件免费共享给大家
2016-06-13 13:05 来源:www.chinab4c.com 作者:ecshop专家
代码: 1、打开goods.dwt加入
2、打开goods.php 加入 $smarty->assign('product_list',product_list($goods_id, '')); 3、打开flow.php加入 //-- 添加商品到购物车 if($_REQUEST['step'] =='all_addcart') { $goods_id = $_POST["goods_id"]; //获得批发相关值 foreach($_POST['number'] as $idx=>$value) { $number = $value; $number_all= $value+$number_all; $goods_attr_id = join(",",$_POST['goods_attr'][$idx]); $product_sn = $_POST['product_sn'][$idx]; addto_cart($goods_id,$number,$_POST['goods_attr'][$idx],'',$content); $arr[$idx] = array('number'=>$number,'goods_attr'=>$goods_attr_id,'product_sn'=>$product_sn); // $sql = $GLOBALS['db']->query("insert into ".$GLOBALS['ecs']->table('cart_p')." (goods_id,product_id,number,goods_attr,product_sn,session_id) values('$goods_id','$idx','$number','$goods_attr_id','$product_sn','".SESS_ID."')"); } //商品id // $content = serialize($arr); //$number = $number_all; ecs_header("Location:./flow.php\n"); } function product_list($goods_id, $conditions = '') { $sql = "SELECT COUNT(*) FROM " .$GLOBALS['ecs']->table('products'). " AS p WHERE goods_id = $goods_id $where"; $filter['record_count'] = $GLOBALS['db']->getOne($sql); $sql = "SELECT product_id, goods_id, goods_attr, product_sn, product_number FROM " . $GLOBALS['ecs']->table('products') . " AS g WHERE goods_id = $goods_id "; $row = $GLOBALS['db']->getAll($sql); $goods_attr = product_goods_attr_list($goods_id); foreach ($row as $key => $value) { $_goods_attr_array = explode('|', $value['goods_attr']); if (is_array($_goods_attr_array)) { $_temp = ''; foreach ($_goods_attr_array as $_goods_attr_value) { $_temp[] = $goods_attr[$_goods_attr_value]; } $row[$key]['goods_attr'] = $_temp; } $row[$key]['goods_attr_id'] = $_goods_attr_array; } return $row; }
最近更新
常用插件
- ecshop选择下单时间插件
ecshop选择下单时间插件主要是根据不同的下单配送要求,在ecshop购物车...
- ecshop供应商插件免费下载
ecshop供应商插件免费下载...
- ecshop按分类筛选销售排行
ecshop按分类筛选销售排行...
- ecshop二次开发售后维修卡
插件介绍: 本插件是用于专门从事电子,信息,软件等售后服务关键比...
- ecshop快递发货单打印商品
ecshop快递发货单打印商品信息,大家都知道ecshop快递单打印的时候,只能...
ecshop热门问答
ecshop热门资料
ecshop怎么操作
ecshopsessions
ecshop无法上传图片
ecshop成立
ecshop自主
ecshop联合登陆
ecshop谷歌ads
ecmallconfget
ecshop后台扩展分类
ecshop分站
ecshop老板
ecshop插口
ecshop广告调用问题
ecshop武汉
ecshop为您服务
ecshop诚邀
ecshop感叹号
ecshopException
ecshop界面
ecshopshopex模板制作
ecshop客户权限
ecshop漏洞补丁
ecshop盛付通
ecshop工资
ecshop大杂烩
ecshop天猫数据采集
ecshop广告图片
ecshop可能性
ecshop失落的大地
ecshop相册