最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ecshop中首页显示商品购买过的次数方法
时间:2012-04-26 编辑:简简单单 来源:一聚教程网
这个需要修改一个程序文件 lib_goods.php
在文件末尾添加一个函数 function get_buy_sum($goods_id)
代码如下 | 复制代码 |
{ $sql = "select sum(goods_number) from " . $GLOBALS['ecs']->table('order_goods') . " AS g ,".$GLOBALS['ecs']->table('order_info') . " AS o WHERE o.order_id=g.order_id and g.goods_id = " . $goods_id . " and o.order_status=1 " ;//o.order_status=1 表示确认了的订单才算 return $GLOBALS['db']->getOne($sql); } 剩下的就是通过在模板中用 |
调用了
相关文章
- 魅族PRO 7亮相工信部 副屏像智能冰箱显示器 07-20
- 显示器画面抖动是什么原因 怎么解决画面抖动 07-15
- CAD中标题栏显示不全怎么解决 07-10
- word单页显示效果怎么做 07-04
- 针对不同显示器 微软Xbox One X智能适配4K材质包 06-27
- ps如何绘制一个复古风格的CRT显示器故障图 06-20