Exemple #1
0
    }
    /* 订单信息 */
    $smarty->assign('order', $order);
    $smarty->assign('total', $total);
    $smarty->assign('goods_list', $cart_goods);
    $smarty->assign('order_submit_back', sprintf($_LANG['order_submit_back'], $_LANG['back_home'], $_LANG['goto_user_center']));
    // 返回提示
    user_uc_call('add_feed', array($order['order_id'], BUY_GOODS));
    //推送feed到uc
    unset($_SESSION['flow_consignee']);
    // 清除session中保存的收货人信息
    unset($_SESSION['flow_order']);
    unset($_SESSION['direct_shopping']);
} elseif ($_REQUEST['step'] == 'update_cart') {
    if (isset($_POST['goods_number']) && is_array($_POST['goods_number'])) {
        flow_update_cart($_POST['goods_number']);
    }
    show_message($_LANG['update_cart_notice'], $_LANG['back_to_cart'], 'flow.php');
    exit;
} elseif ($_REQUEST['step'] == 'drop_goods') {
    $rec_id = intval($_GET['id']);
    flow_drop_cart_goods($rec_id);
    ecs_header("Location: flow.php\n");
    exit;
} elseif ($_REQUEST['step'] == 'add_favourable') {
    /* 取得优惠活动信息 */
    $act_id = intval($_POST['act_id']);
    $favourable = favourable_info($act_id);
    if (empty($favourable)) {
        show_message($_LANG['favourable_not_exist']);
    }
Exemple #2
0
     }
     // 更新:添加到购物车
     if (addto_cart($goods_id, $goods_number, $goods_spec)) {
         GZ_Api::outPut(array());
     } else {
         GZ_Api::outPut(14);
     }
     break;
 case 'update':
     $rec_id = _POST('rec_id', 0);
     $new_number = _POST('new_number', 0);
     if ($new_number < 1 || !$rec_id) {
         GZ_Api::outPut(101);
     }
     $goods_number = array($rec_id => $new_number);
     flow_update_cart($goods_number);
     $cart_goods = get_cart_goods();
     GZ_Api::outPut($cart_goods['total']);
     break;
 case 'delete':
     $rec_id = _POST('rec_id', 0);
     flow_drop_cart_goods($rec_id);
     $cart_goods = get_cart_goods();
     GZ_Api::outPut($cart_goods['total']);
     break;
 case 'list':
     $GLOBALS['_CFG']['show_goods_in_cart'] = 3;
     $cart_goods = gz_get_cart_goods();
     if (!empty($cart_goods['goods_list'])) {
         foreach ($cart_goods['goods_list'] as $key => $value) {
             unset($cart_goods['goods_list'][$key]['user_id']);