/* 代码增加_end By www.ecshop68.com */ $smarty->assign('promotion', get_promotion_info($goods_id, $goods['supplier_id'])); //促销信息 $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('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_attr_www_ecshop68_com($goods_id, $goods_attr_id)); // 商品相册_修改 By www.ecshop68.com $smarty->assign('new_goods', get_recommend_goods('new')); // 最新商品 改 By www.ecshop68.com $smarty->assign('bought_goods', get_also_bought($goods_id)); // 购买了该商品的用户还购买了哪些商品 $smarty->assign('goods_rank', get_goods_rank($goods_id)); // 商品的销售排名 $smarty->assign('best_goods', get_recommend_goods('best', $goods['supplier_id'])); // 最新商品 //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);
} /* 代码增加_end By www.68ecshop.com */ /* 代码增加_start By www.ecshop68.com */ $sql_attr_www_ecshop68_com = "SELECT a.attr_id, ga.goods_attr_id FROM " . $GLOBALS['ecs']->table('attribute') . " AS a left join " . $GLOBALS['ecs']->table('goods_attr') . " AS ga on a.attr_id=ga.attr_id WHERE a.is_attr_gallery=1 and ga.goods_id='" . $goods_id . "' order by ga.goods_attr_id "; $goods_attr = $GLOBALS['db']->getRow($sql_attr_www_ecshop68_com); if ($goods_attr) { $goods_attr_id = $goods_attr['goods_attr_id']; $smarty->assign('attr_id', $goods_attr['attr_id']); } else { $smarty->assign('attr_id', 0); } if (!empty($_REQUEST['act']) && $_REQUEST['act'] == 'get_gallery_attr') { include 'includes/cls_json.php'; $json = new JSON(); $goods_attr_id = $_REQUEST['goods_attr_id']; $gallery_list_www_ecshop68_com = get_goods_gallery_attr_www_ecshop68_com($goods_id, $goods_attr_id); $gallery_content = array(); $gallery_content['thumblist'] = '<ul>'; foreach ($gallery_list_www_ecshop68_com as $gkey => $gval) { $gallery_content['thumblist'] .= '<li>'; $gallery_content['thumblist'] .= '<a href="' . $gval['img_original'] . '" rel="zoom-id: zoom; zoom-height: 360px;zoom-width:400px;" rev="' . $gval['img_url'] . '" name="' . $gval['img_url'] . '" rev="' . $gval['img_original'] . '" '; $gallery_content['thumblist'] .= '><img src="' . ($gval['thumb_url'] ? $gval['thumb_url'] : $gval['img_url']) . '" class="B_blue" '; $gallery_content['thumblist'] .= ' /></a></li>'; if ($gkey == 0) { $gallery_content['bigimg'] = $gval['img_original']; $gallery_content['middimg'] .= $gval['img_url']; } } $gallery_content['thumblist'] .= '</ul>'; die($json->encode($gallery_content)); }