ecshop商品批发批量购买插件

2016-06-13 13:05 来源:www.chinab4c.com 作者:ecshop专家

类似效果:   代码: 1、打开goods.dwt加入    

                                                                                       
货号规格销售价会员价订购数量库存
{$product.product_sn}          {$goods_attr}   |           {$goods.shop_price_formated}                  {$rank_price.rank_name}: {$rank_price.price}                 {$product.product_number}
2、打开goods.php 加入 $smarty->assign('product_list',product_list($goods_id, '')); 3、打开flow.php加入 //-- 添加商品到购物车(ecshop119修改) /*------------------------------------------------------ */ 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"); }