$tag_array = get_tags($goods_id); $smarty->assign('tags', $tag_array); // 商品的标记 //获取关联礼包 $package_goods_list = get_package_goods_list($goods['goods_id']); $smarty->assign('package_goods_list', $package_goods_list); // 获取关联礼包 assign_dynamic('goods'); $volume_price_list = get_volume_price_list($goods['goods_id'], '1'); $smarty->assign('volume_price_list', $volume_price_list); // 商品优惠价格区间 $smarty->assign('user_may_love', get_collected_goods($_REQUEST[id])); assign_rank_name($smarty); //chen-0925 添加函数assign_rank_name $smarty->assign('recently_buy', recently_buy($goods_id)); $sale_history = getsales_history($goods_id); $smarty->assign('sale_history', $sale_history); $smarty->assign('count_sale_history', count($sale_history)); } } /* 记录浏览历史 */ if (!empty($_COOKIE['ECS']['history'])) { $history = explode(',', $_COOKIE['ECS']['history']); array_unshift($history, $goods_id); $history = array_unique($history); while (count($history) > $_CFG['history_number']) { array_pop($history); } setcookie('ECS[history]', implode(',', $history), gmtime() + 3600 * 24 * 30); } else { setcookie('ECS[history]', $goods_id, gmtime() + 3600 * 24 * 30);
assign_template(); $position = assign_ur_here(0, $goods['goods_name']); $smarty->assign('goods_id', $group_buy['goods_id']); $smarty->assign('now_time', gmtime()); $smarty->assign('end_date', $group_buy['end_date']); $smarty->assign('recently_buy', recently_buy($goods_id)); $fuwu = $db->getOne("SELECT content FROM " . $ecs->table('article') . " WHERE article_id =52 "); //售后服务 $smarty->assign('fuwu', $fuwu); $smarty->assign('goods_number', $group_buy['goods_number']); //库存量 $smarty->assign('page_title', $position['title']); // 页面标题 $smarty->assign('ur_here', $position['ur_here']); // 当前位置 $smarty->assign('sale_history', getsales_history($goods_id)); //获取购买历史记录 $smarty->assign('hot_goods', get_recommend_goods('hot')); // 最热商品 $smarty->assign('script_name', 'group'); $smarty->assign('categories', get_categories_tree()); // 分类树 $smarty->assign('helps', get_shop_help()); // 网店帮助 $smarty->assign('top_goods', get_top10()); // 销售排行 $smarty->assign('promotion_info', get_promotion_info()); $smarty->assign('comment_percent', comment_percent($goods_id)); //获取评分 assign_dynamic('group_buy_goods'); }