/**
* 获得指定商品的关联商品
* @position goods.php
* @access public
* @param integer $goods_id
* @return array
*/
get_linked_goods($goods_id)
array(1) { [13] => array(9) { ["goods_id"] => string(2) "13" ["goods_name"] => string(25) "诺基亚5320 XpressMusic" ["short_name"] => string(16) "诺基亚5320..." ["goods_thumb"] => string(52) "images/200905/thumb_img/13_thumb_G_1241968002527.jpg" ["goods_img"] => string(46) "images/200905/goods_img/13_G_1241968002233.jpg" ["market_price"] => string(10) "¥1573元" ["shop_price"] => string(10) "¥1311元" ["url"] => string(15) "goods.php?id=13" ["promote_price"] => int(0) } }
/**
* 获得购买过该商品的人还买过的商品
* @position goods.php
* @access public
* @param integer $goods_id
* @return array
*/
function get_also_bought($goods_id)
array(3) { [0] => array(9) { ["goods_id"] => string(2) "24" ["goods_name"] => string(4) "P806" ["short_name"] => string(4) "P806" ["goods_thumb"] => string(52) "images/200905/thumb_img/24_thumb_G_1241971981429.jpg" ["goods_img"] => string(46) "images/200905/goods_img/24_G_1241971981284.jpg" ["shop_price"] => string(10) "¥2000元" ["url"] => string(15) "goods.php?id=24" ["promote_price"] => int(0) ["formated_promote_price"] => string(7) "¥0元" } [1] => array(9) { ["goods_id"] => string(1) "8" ["goods_name"] => string(13) "飞利浦9@9v" ["short_name"] => string(13) "飞利浦9@9v" ["goods_thumb"] => string(51) "images/200905/thumb_img/8_thumb_G_1241425513488.jpg" ["goods_img"] => string(45) "images/200905/goods_img/8_G_1241425513055.jpg" ["shop_price"] => string(9) "¥399元" ["url"] => string(14) "goods.php?id=8" ["promote_price"] => int(0) ["formated_promote_price"] => string(7) "¥0元" } }
/**
* 获得购物车中商品的配件
* @position lib_goods.php
* @access public
* @param array $goods_list,包含商品id的数组
* @return array
*/
get_goods_fittings($goods_list = array())
array(3) { [0] => array(11) { ["parent_id"] => string(1) "9" ["parent_name"] => string(12) "诺基亚E66" ["parent_short_name"] => string(12) "诺基亚E66" ["goods_id"] => string(1) "3" ["goods_name"] => string(25) "诺基亚原装5800耳机" ["short_name"] => string(20) "诺基亚原装58..." ["fittings_price"] => string(8) "¥68元" ["shop_price"] => string(8) "¥68元" ["goods_thumb"] => string(51) "images/200905/thumb_img/3_thumb_G_1241422082679.jpg" ["goods_img"] => string(45) "images/200905/goods_img/3_G_1241422082168.jpg" ["url"] => string(14) "goods.php?id=3" } [1] => array(11) { ["parent_id"] => string(1) "9" ["parent_name"] => string(12) "诺基亚E66" ["parent_short_name"] => string(12) "诺基亚E66" ["goods_id"] => string(1) "4" ["goods_name"] => string(27) "诺基亚N85原装充电器" ["short_name"] => string(18) "诺基亚N85原..." ["fittings_price"] => string(8) "¥58元" ["shop_price"] => string(8) "¥58元" ["goods_thumb"] => string(51) "images/200905/thumb_img/4_thumb_G_1241422402467.jpg" ["goods_img"] => string(45) "images/200905/goods_img/4_G_1241422402722.jpg" ["url"] => string(14) "goods.php?id=4" } }
/**
* 获取销售排行榜
* @position lib_custom.php
* @access public
* @param num $time 查询的时间范围,单位为天
* @param num $limit 数量
* @param string $cats 查询的分类表达式
* @return array
*/
get_sale_rank($time=7,$limit=10,$cats = '')