仿淘宝商城站商品分类页显示用户评论统计功能
时间:2010-04-03 来源:yuling520169
修改以下:
1、修改category.php页,和search.php页查找 $arr[$row['goods_id']]['goods_brief'] = $row['goods_brief'];
在前面加上:
$goods_id = $row['goods_id'];
$count = $GLOBALS['db']->getOne("SELECT COUNT(*) FROM " . $GLOBALS['ecs']->table('comment') . " where comment_type=0 and id_value ='$goods_id'");
$arr[$row['goods_id']]['review_count'] = $count;
OK!!!
2、修改goods_list.lbi和search.dwt页,商品名称下或价格下(你想要的位置上)加入:
(已有<font color="#CC0000" style="font-weight:bold;">{$goods.review_count}</font>人评论)
二步搞定OK!!!
1、修改category.php页,和search.php页查找 $arr[$row['goods_id']]['goods_brief'] = $row['goods_brief'];
在前面加上:
$goods_id = $row['goods_id'];
$count = $GLOBALS['db']->getOne("SELECT COUNT(*) FROM " . $GLOBALS['ecs']->table('comment') . " where comment_type=0 and id_value ='$goods_id'");
$arr[$row['goods_id']]['review_count'] = $count;
OK!!!
2、修改goods_list.lbi和search.dwt页,商品名称下或价格下(你想要的位置上)加入:
(已有<font color="#CC0000" style="font-weight:bold;">{$goods.review_count}</font>人评论)
二步搞定OK!!!
相关阅读 更多 +