ecshop获取最新购买代码函数
2016-06-13 13:05 来源:www.chinab4c.com 作者:ecshop专家
ecshop获取最新购买代码函数 function index_get_recent_buy_query() { $sql="select og.goods_id,og.goods_name,sum(og.goods_number) as buy_count from (select order_id,add_time from ".$GLOBALS['ecs']->table('order_info')." order by add_time desc limit 10) as o,".$GLOBALS['ecs']->table('order_goods')." as og where o.order_id=og.order_id group by og.goods_id"; $all = $GLOBALS['db']->getAll($sql); $arr = array(); foreach ($all AS $idx =>$row) { $arr[$idx]['goodName'] = $row['goods_name']; $arr[$idx]['goodID'] = $row['goods_id']; $arr[$idx]['add_time'] = local_date($GLOBALS['_CFG']['date_format'], $row['add_time']); $arr[$idx]['buy_count']=$row['buy_count']; } return $arr; }
最近更新
常用插件
- ecshop选择下单时间插件
ecshop选择下单时间插件主要是根据不同的下单配送要求,在ecshop购物车...
- ecshop按分类筛选销售排行
ecshop按分类筛选销售排行...
- ecshop供应商插件免费下载
ecshop供应商插件免费下载...
- ecshop快递发货单打印商品
ecshop快递发货单打印商品信息,大家都知道ecshop快递单打印的时候,只能...
- ecshop二次开发售后维修卡
插件介绍: 本插件是用于专门从事电子,信息,软件等售后服务关键比...