Exemplo n.º 1
0
	public function goods_gallery (){
		if(!empty ($_REQUEST['goods_id']))
		{
		    $goods_id = trim($_REQUEST['goods_id']);
		}else{
		    $msg = rpcLang('goods.php', 'param_failure1');
		    $error['param_failure1'] = $msg;
		    jsonExit($error);
		}
		$goods_gallery = get_goods_gallery($goods_id);
	    jsonExit($goods_gallery);
	}
Exemplo n.º 2
0
 // 商品属性
 $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(' ','一', '二', '三','四','五','六','七','八','九','十');
         $smarty->assign('comboTab',$comboTabIndex);
         //组合套餐组
         $fittings_list = get_goods_fittings(array($goods_id));
         if(is_array($fittings_list)){
Exemplo n.º 3
0
Arquivo: goods.php Projeto: qgz/ecshop
/* 显示分类名称 */
$cat_array = get_parent_cats($goods_info['cat_id']);
krsort($cat_array);
$cat_str = '';
foreach ($cat_array as $key => $cat_data) {
    $cat_array[$key]['cat_name'] = encode_output($cat_data['cat_name']);
    $cat_str .= "<a href='category.php?c_id={$cat_data['cat_id']}'>" . encode_output($cat_data['cat_name']) . "</a>-&gt;";
}
$smarty->assign('cat_array', $cat_array);
$properties = get_goods_properties($goods_id);
// 获得商品的规格和属性
$smarty->assign('specification', $properties['spe']);
// 商品规格
$comment = assign_comment($goods_id, 0);
$smarty->assign('comment', $comment);
$goods_gallery = get_goods_gallery($goods_id);
$smarty->assign('picturesnum', count($goods_gallery));
// 相册数
$smarty->assign('pictures', $goods_gallery);
// 商品相册
$smarty->assign('now_time', gmtime());
// 当前系统时间
$smarty->display('goods.dwt');
/**
 * 获得指定商品的各会员等级对应的价格
 *
 * @access  public
 * @param   integer	 $goods_id
 * @return  array
 */
function get_user_rank_prices($goods_id, $shop_price)