• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP favourable_list函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fb函数代码示例发布时间:2022-05-15
下一篇:
PHP favourable_info函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap