Beispiel #1
0
 /* 对商品信息赋值 */
 $cart_goods = cart_goods($flow_type);
 // 取得商品列表,计算合计
 /*
  * 分供货商显示商品
  */
 $cart_goods_new = array();
 if (count($cart_goods) > 0) {
     foreach ($cart_goods as $key => $val) {
         //morestock_morecity start
         //if($val['stock_num']<=0 || $val['stock_num']<$val['goods_number']){
         //show_message('购物车中商品['.$val['goods_name'].']库存不足!', '', '', 'warning');
         //}
         //morestock_morecity end
         $cart_goods_new[$val['supplier_id']]['goodlist'][] = $val;
         $cart_goods_new[$val['supplier_id']]['shipping_html'] = insert_get_shop_shipping(array('suppid' => $val['supplier_id']));
     }
 }
 if ($flow_type != CART_EXCHANGE_GOODS && $flow_type != CART_GROUP_BUY_GOODS) {
     foreach ($cart_goods_new as $k => $v) {
         $discount = compute_discount($k);
         if (is_array($discount)) {
             $cart_goods_new[$k]['zhekou']['discount'] = $discount['discount'];
             $favour_name = empty($discount['name']) ? '' : join(',', $discount['name']);
             $cart_goods_new[$k]['zhekou']['your_discount'] = sprintf($_LANG['your_discount'], $favour_name, price_format($discount['discount']));
         }
     }
 }
 /* 对是否允许修改购物车赋值 */
 if ($flow_type != CART_GENERAL_GOODS || $_CFG['one_step_buy'] == '1') {
     $smarty->assign('allow_edit_cart', 0);
Beispiel #2
0
 $smarty->assign('name_of_region', array($_CFG['name_of_region_1'], $_CFG['name_of_region_2'], $_CFG['name_of_region_3'], $_CFG['name_of_region_4']));
 $smarty->assign('consignee_list', $consignee_list_ecshop68);
 $smarty->assign('shop_province_list', get_regions(1, $_CFG['shop_country']));
 $smarty->assign('shop_country_list', get_regions(0, 0));
 /* 代码增加_end  By  www.68ecshop.com */
 /* 对商品信息赋值 */
 $cart_goods = cart_goods($flow_type);
 // 取得商品列表,计算合计
 /*
  * 分供货商显示商品
  */
 $cart_goods_new = array();
 if (count($cart_goods) > 0) {
     foreach ($cart_goods as $key => $val) {
         $cart_goods_new[$val['supplier_id']]['goodlist'][] = $val;
         $cart_goods_new[$val['supplier_id']]['shipping_html'] = insert_get_shop_shipping(array('suppid' => $val['supplier_id'], 'consignee' => $consignee, 'flow_type' => $flow_type));
     }
 }
 if ($flow_type != CART_EXCHANGE_GOODS && $flow_type != CART_GROUP_BUY_GOODS) {
     foreach ($cart_goods_new as $k => $v) {
         $discount = compute_discount($k);
         if (is_array($discount)) {
             $cart_goods_new[$k]['zhekou']['discount'] = $discount['discount'];
             $favour_name = empty($discount['name']) ? '' : join(',', $discount['name']);
             $cart_goods_new[$k]['zhekou']['your_discount'] = sprintf($_LANG['your_discount'], $favour_name, price_format($discount['discount']));
         }
     }
 }
 /* 对是否允许修改购物车赋值 */
 if ($flow_type != CART_GENERAL_GOODS || $_CFG['one_step_buy'] == '1') {
     $smarty->assign('allow_edit_cart', 0);