shopex首页显示已售数量

我使用的goods挂件

找到:

$result['goods']=$o->getList(null,$filter,0,$limit,$order['sql']);

改成

$result['goods']=$o->getList('name,price,store,cat_id,view_count,buy_count,comments_count,brand,brand_id,bn',$filter,0,$limit,$order['sql']);

 

模板中直接可以:

<{$goods_data.buy_count}>

 

其实这里的null是一个字段的选择的参数。相当于select 后面跟的参数。

其他挂件需要显示buy_count的话,也可以按照上面的方法,进行修改 .

posted @ 2012-02-20 14:30  Michael Zhang x  Views(618)  Comments(0Edit  收藏  举报