FWQ
在ECSHOP首页显示商品总数和本月更新数
经常在论坛里看到有人问到类似问题,今天就把方法共享一下。 1)、首先修改 /index.php 找到 assign_dynamic(‘index’); 在它后边添加一些代码 $sql=”select count(*) as goods_all from “. $ecs->table(‘goods’); //商品总数 $smarty->assign(‘goodsnum_all’,$db->getOne($sql)); $time_month=mktime(0,0,0,date(‘m’)-1,1,date(‘Y’)); $sql=”select count(*) as goods_month from “. $ecs->table(‘goods’) .” where last_update >= ”…