ecshop调用评论数量显示在评论等级后面

作者:白雪 | 创建时间: 2023-04-16
ecshop调用评论数量显示在评论等级后面

操作方法

第一步,打开 category.php, 找到 $arr[$row['goods_id']]['name']             = $row['goods_name']; 复制代码在下面添加一下代码: $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; 第二步,打开goods_list.lbi,在合适的地方添加以下代码: (此商品已有<font color="#CC0000" style="font-weight:bold;">{$goods.review_count}</font>人评论)

点击展开全文

更多推荐