本文整理汇总了PHP中flow_update_cart函数的典型用法代码示例。如果您正苦于以下问题:PHP flow_update_cart函数的具体用法?PHP flow_update_cart怎么用?PHP flow_update_cart使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了flow_update_cart函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sprintf
}
/* 订单信息 */
$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']);
}
示例2: _POST
}
// 更新:添加到购物车
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']);