当前位置: 首页>>代码示例>>PHP>>正文


PHP favourable_list函数代码示例

本文整理汇总了PHP中favourable_list函数的典型用法代码示例。如果您正苦于以下问题:PHP favourable_list函数的具体用法?PHP favourable_list怎么用?PHP favourable_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了favourable_list函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_cart_goods

 }
 /* 取得商品列表,计算合计 */
 $cart_goods = get_cart_goods();
 $smarty->assign('goods_list', $cart_goods['goods_list']);
 $smarty->assign('total', $cart_goods['total']);
 //购物车的描述的格式化
 $smarty->assign('shopping_money', sprintf($_LANG['shopping_money'], $cart_goods['total']['goods_price']));
 $smarty->assign('market_price_desc', sprintf($_LANG['than_market_price'], $cart_goods['total']['market_price'], $cart_goods['total']['saving'], $cart_goods['total']['save_rate']));
 // 显示收藏夹内的商品
 if ($_SESSION['user_id'] > 0) {
     require_once ROOT_PATH . 'includes/lib_clips.php';
     $collection_goods = get_collection_goods($_SESSION['user_id']);
     $smarty->assign('collection_goods', $collection_goods);
 }
 /* 取得优惠活动 */
 $favourable_list = favourable_list($_SESSION['user_rank']);
 usort($favourable_list, 'cmp_favourable');
 $smarty->assign('favourable_list', $favourable_list);
 /* 计算折扣 */
 $discount = compute_discount();
 $smarty->assign('discount', $discount['discount']);
 $favour_name = empty($discount['name']) ? '' : join(',', $discount['name']);
 $smarty->assign('your_discount', sprintf($_LANG['your_discount'], $favour_name, price_format($discount['discount'])));
 /* 增加是否在购物车里显示商品图 */
 $smarty->assign('show_goods_thumb', $GLOBALS['_CFG']['show_goods_in_cart']);
 /* 增加是否在购物车里显示商品属性 */
 $smarty->assign('show_goods_attribute', $GLOBALS['_CFG']['show_attr_in_cart']);
 /* 购物车中商品配件列表 */
 //取得购物车中基本件ID
 $sql = "SELECT goods_id " . "FROM " . $GLOBALS['ecs']->table('cart') . " WHERE session_id = '" . SESS_ID . "' " . "AND rec_type = '" . CART_GENERAL_GOODS . "' " . "AND is_gift = 0 " . "AND extension_code <> 'package_buy' " . "AND parent_id = 0 ";
 $parent_list = $GLOBALS['db']->getCol($sql);
开发者ID:will0306,项目名称:bianli100,代码行数:31,代码来源:flow.php

示例2: get_cart_goods

 }
 /* 取得商品列表,计算合计 */
 $cart_goods = get_cart_goods();
 $smarty->assign('goods_list', $cart_goods['goods_list']);
 $smarty->assign('total', $cart_goods['total']);
 //购物车的描述的格式化
 $smarty->assign('shopping_money', sprintf($_LANG['shopping_money'], $cart_goods['total']['goods_price']));
 $smarty->assign('market_price_desc', sprintf($_LANG['than_market_price'], $cart_goods['total']['market_price'], $cart_goods['total']['saving'], $cart_goods['total']['save_rate']));
 // 显示收藏夹内的商品
 if ($_SESSION['user_id'] > 0) {
     require_once ROOT_PATH . 'includes/lib_clips.php';
     $collection_goods = get_collection_goods($_SESSION['user_id']);
     $smarty->assign('collection_goods', $collection_goods);
 }
 /* 取得优惠活动 */
 $favourable_list = favourable_list($_SESSION['user_rank'], $cart_goods['total']['goods_amount']);
 usort($favourable_list, 'cmp_favourable');
 $smarty->assign('favourable_list', $favourable_list);
 /* 计算折扣 */
 $discount = compute_discount();
 $smarty->assign('discount', $discount['discount']);
 $favour_name = empty($discount['name']) ? '' : join(',', $discount['name']);
 $smarty->assign('your_discount', sprintf($_LANG['your_discount'], $favour_name, price_format($discount['discount'])));
 /* 增加是否在购物车里显示商品图 */
 $smarty->assign('show_goods_thumb', $GLOBALS['_CFG']['show_goods_in_cart']);
 /* 增加是否在购物车里显示商品属性 */
 $smarty->assign('show_goods_attribute', $GLOBALS['_CFG']['show_attr_in_cart']);
 /* 购物车中商品配件列表 */
 //取得购物车中基本件ID
 $sql = "SELECT goods_id " . "FROM " . $GLOBALS['ecs']->table('cart') . " WHERE session_id = '" . SESS_ID . "' " . "AND rec_type = '" . CART_GENERAL_GOODS . "' " . "AND is_gift = 0 " . "AND extension_code <> 'package_buy' " . "AND parent_id = 0 ";
 $parent_list = $GLOBALS['db']->getCol($sql);
开发者ID:naliduo,项目名称:ecshop,代码行数:31,代码来源:recharge.php

示例3: array

    /* 模板赋值 */
    $smarty->assign('full_page', 1);
    $smarty->assign('ur_here', $_LANG['favourable_list']);
    $smarty->assign('action_link', array('href' => 'favourable.php?act=add', 'text' => $_LANG['add_favourable']));
    $list = favourable_list();
    $smarty->assign('favourable_list', $list['item']);
    $smarty->assign('filter', $list['filter']);
    $smarty->assign('record_count', $list['record_count']);
    $smarty->assign('page_count', $list['page_count']);
    $sort_flag = sort_flag($list['filter']);
    $smarty->assign($sort_flag['tag'], $sort_flag['img']);
    /* 显示商品列表页面 */
    assign_query_info();
    $smarty->display('favourable_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
    $list = favourable_list();
    $smarty->assign('favourable_list', $list['item']);
    $smarty->assign('filter', $list['filter']);
    $smarty->assign('record_count', $list['record_count']);
    $smarty->assign('page_count', $list['page_count']);
    $sort_flag = sort_flag($list['filter']);
    $smarty->assign($sort_flag['tag'], $sort_flag['img']);
    make_json_result($smarty->fetch('favourable_list.htm'), '', array('filter' => $list['filter'], 'page_count' => $list['page_count']));
} elseif ($_REQUEST['act'] == 'remove') {
    check_authz_json('favourable');
    $id = intval($_GET['id']);
    $favourable = favourable_info($id);
    if (empty($favourable)) {
        make_json_error($_LANG['favourable_not_exist']);
    }
    $name = $favourable['act_name'];
开发者ID:nirvana-info,项目名称:old_bak,代码行数:31,代码来源:favourable.php

示例4: del_cart_favourable_goods

/**
 * 修改购物车中商品数量,删除商品,取消选择时判断是否在此商品参加的优惠活动已经存在购物车,如果有就删除掉
 */
function del_cart_favourable_goods()
{
    $favlist = favourable_list($_SESSION['user_rank']);
    return $favlist;
}
开发者ID:moonlight-wang,项目名称:feilun,代码行数:8,代码来源:flow.php


注:本文中的favourable_list函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。