ECShop笔记(商品类)
/**
* 获得指定商品的关联商品
* @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 = '')
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· [AI/GPT/综述] AI Agent的设计模式综述
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!