Ecshop销售排行二次开发方法
Echop销售排行默认显示只有,10条记录比较少。可以通过二次开发他的功能来实现。
修攺include/lib_goods.php
/**
* 调用当前分类的销售排行榜
*
* @access public
* @param string $cats 查询的分类
* @return array
*/
function get_top10($cats = '')
{
}
修攺此配置可以实现,指定某个商品显示在销售排行中,也可以实现多显示几个销售排行。
具体修攺
$sql = 'SELECT g.goods_id, g.goods_name, g.goods_img, SUM(og.goods_number) as goods_number ' .
'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g, ' .
$GLOBALS['ecs']->table('order_info') . ' AS o, ' .
$GLOBALS['ecs']->table('order_goods') . ' AS og ' .
"WHERE g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 $where $top10_time " ;
Ecshop商城二次开发,PHP项目,商城项目,PHPCMS,DEDEMCS
- 上一篇:PHP网站建设费用
- 下一篇:火车头采集器-PHP采集系统