Opencart评论星星的前面加文字, 打开catalog/view/theme/default/template/product/review.tpl <tr><td colspan="2"><p><?php echo $review['text']; ?></p> 受众面:<?php for ($i = 1; $i <= 5; $i++) { ?> <?php if ($review['rating'] < $i) { ?> <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> <?php } else { ?> <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span> <?php } ?> <?php } ?></td> </tr> 增减以上代码即可(责任编辑:好模板) |