예제 #1
0
 // 商品规格
 $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('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('promotion_goods', get_promote_goods_group());
 // 特价商品
 $smarty->assign('top_goods', get_top10());
 // 销售排行
 //yyy添加start
 $count1 = $GLOBALS['db']->getOne("SELECT COUNT(*) FROM " . $GLOBALS['ecs']->table('comment') . " where comment_type=0 and id_value ='{$goods_id}' and status=1");
 $smarty->assign('review_count', $count1);
 //yyy添加end名
 //获取tag
 $tag_array = get_tags($goods_id);
 $smarty->assign('tags', $tag_array);
 // 商品的标记
 //获取关联礼包
 $package_goods_list = get_package_goods_list($goods['goods_id']);
예제 #2
0
 $smarty->assign('new_goods', get_exchange_recommend_goods('new', $children, $integral_min, $integral_max));
 // 获取精品上新 chen 08 30
 $count = get_exchange_goods_count($children, $integral_min, $integral_max);
 $max_page = $count > 0 ? ceil($count / $size) : 1;
 if ($page > $max_page) {
     $page = $max_page;
 }
 $now = gmtime();
 $started = "  {$now} > eg.begin_time ";
 $not_started = "  {$now} < eg.begin_time ";
 $goods_trailer = exchange_get_goods($children, $integral_min, $integral_max, $ext, $size, $page, $sort, $order, $not_started);
 // 获取未开始的积分兑换 chen 08 30
 $in_week = gmtime() - 3600 * 24 * 7;
 $in_month = gmtime() - 3600 * 24 * 30;
 $weekly_rank = get_goods_rank(" oi.pay_time > {$in_week}");
 $monthly_rank = get_goods_rank(" oi.pay_time > {$in_month}");
 if ($display == 'grid') {
     if (count($goodslist) % 2 != 0) {
         $goodslist[] = array();
     }
 }
 /* 积分商城广告 */
 $ad_integral = $db->getRow('SELECT ad_code, ad_link FROM ' . $ecs->table("ad") . ' WHERE position_id = 2 ');
 $smarty->assign('ad_integral', $ad_integral);
 $smarty->assign('goods_trailer', $goods_trailer);
 $smarty->assign('weekly_rank', $weekly_rank);
 $smarty->assign('monthly_rank', $monthly_rank);
 $smarty->assign('category', $cat_id);
 $smarty->assign('integral_max', $integral_max);
 $smarty->assign('integral_min', $integral_min);
 if ($user_id) {