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

PHP get_goods_fittings函数代码示例

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

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



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

示例1: cart

	public function cart () {
		/* 标记购物流程为普通商品 */
	    $_SESSION['flow_type'] = CART_GENERAL_GOODS;
		/*
		#如果是一步购物,跳到结算中心
	    if ($_CFG['one_step_buy'] == '1')
	    {
	        ecs_header("Location: flow.php?step=checkout\n");
	        exit;
	    }
		*/
	    #取得商品列表,计算合计 */
	    $cart_goods = get_cart_goods();
		if(!$cart_goods) {
	        $msg = rpcLang('flow.php', 'cartlist_empty');      
	        jsonExit("{\"status\":\"$msg\",\"code\":\"1\"}");
	    } 
		/*
	    #显示收藏夹内的商品
	    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');
	
	    #计算折扣
	    $discount = compute_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);
	    $fittings_list = get_goods_fittings($parent_list);
	
		$cart_list = array(
			'cart_goods' => $cart_goods,
			//'favourable_list' => $favourable_list,		
			'discount' => $discount,	
			'fittings_list' => $fittings_list
		);
	    //print_r($cart_list);die;
		jsonExit($cart_list);
	}
开发者ID:noikiy,项目名称:mdwp,代码行数:57,代码来源:flow.action.php


示例2: get_goods_properties

 // 当前位置
 $properties = get_goods_properties($goods_id);
 // 获得商品的规格和属性
 $smarty->assign('properties', $properties['pro']);
 // 商品属性
 $smarty->assign('specification', $properties['spe']);
 // 商品规格
 $smarty->assign('attribute_linked', get_same_attribute_goods($properties));
 // 相同属性的关联商品
 $smarty->assign('related_goods', $linked_goods);
 // 关联商品
 $smarty->assign('goods_article_list', get_linked_articles($goods_id));
 // 关联文章
 $smarty->assign('recommend_goods', get_recommend_goods('hot'));
 //获得相关推荐商品
 $smarty->assign('fittings', get_goods_fittings(array($goods_id)));
 // 配件
 $smarty->assign('rank_prices', get_user_rank_prices($goods_id, $shop_price));
 // 会员等级价格
 $smarty->assign('pictures', get_goods_gallery($goods_id));
 // 商品相册
 //$smarty->assign('bought_goods',        get_also_bought($goods_id));                      // 购买了该商品的用户还购买了哪些商品
 //$smarty->assign('goods_rank',          get_goods_rank($goods_id));                       // 商品的销售排名
 //$smarty->assign('related_cat',         get_related_cat($goods['cat_id']));
 //$smarty->assign('related_brand',         get_related_brand($goods['cat_id']));
 //$smarty->assign('top10_brand',          get_top10_brand($goods['brand_id']));
 //$smarty->assign('top10_category',       get_top10($goods['cat_id']));
 //$smarty->assign('top10_price',       get_top10_price($goods['shop_price']));
 //by mike start
 //组合套餐名
 /*$comboTabIndex = array(' ','一', '二', '三','四','五','六','七','八','九','十');
开发者ID:blowfishJ,项目名称:galaxyCode,代码行数:31,代码来源:goods.php


示例3: usort

    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);
    $fittings_list = get_goods_fittings($parent_list);
    $smarty->assign('fittings_list', $fittings_list);
}
$smarty->assign('currency_format', $_CFG['currency_format']);
$smarty->assign('integral_scale', $_CFG['integral_scale']);
$smarty->assign('step', $_REQUEST['step']);
assign_dynamic('shopping_flow');
$smarty->display('flow.dwt');
/*------------------------------------------------------ */
//-- PRIVATE FUNCTION
/*------------------------------------------------------ */
/**
 * 获得用户的可用积分
 *
 * @access  private
 * @return  integral
开发者ID:will0306,项目名称:bianli100,代码行数:31,代码来源:flow.php


示例4: get_top10_brand

		
		$smarty->assign('top10_brand',          get_top10_brand($goods['brand_id'])); 
		
		$smarty->assign('top10_category',       get_top10($goods['cat_id'])); 
		
		$smarty->assign('top10_price',       get_top10_price($goods['shop_price'])); 
		

	

		//by mike start
        //组合套餐名
        $comboTabIndex = array(' ','一', '二', '三','四','五','六','七','八','九','十');
        $smarty->assign('comboTab',$comboTabIndex);
        //组合套餐组
        $fittings_list = get_goods_fittings(array($goods_id));
        if(is_array($fittings_list)){
                foreach($fittings_list as $vo){
                        $fittings_index[$vo['group_id']] = 1;//关联数组
                }
        }
        ksort($fittings_index);//重新排序
        $smarty->assign('fittings_tab_index', $fittings_index);//套餐数量
        //by mike end
		
        //获取tag
        $tag_array = get_tags($goods_id);
        $smarty->assign('tags',                $tag_array);                                       // 商品的标记

        //获取关联礼包
        $package_goods_list = get_package_goods_list($goods['goods_id']);
开发者ID:blowfishJ,项目名称:galaxyCode,代码行数:30,代码来源:goods.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_goods_gallery函数代码示例发布时间:2022-05-15
下一篇:
PHP get_goods_attr_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