I was looking to find a way to display the number of reviews and reached this post:
http://forum.x-cart.com/viewtopic.php?t=2292 - which shows how to display the number of
votes
Taking off from this idea I made the following mod:
In customer/vote.php add the following code:
Code:
###################
//display total reviews
$reviews_result = func_query_first ("SELECT COUNT(remote_ip) as total FROM $sql_tbl[product_reviews] WHERE productid='$productid'");
if ($reviews_result["total"] == 0)
$smarty->assign ("reviews_result", $reviews_result);
$smarty->assign ("reviews_total", $reviews_result["total"]);
###################
and then in skin1/customer/Modules/Customer_Reviews/reviews.tpl add the following code where you want to display the number:
Personally I placed it here:
Code:
{$reviews_total} {$lng.lbl_customer_reviews}
This shows something like "
11 Customer Reviews"
Neat !
Next I'd like to limit the number of reviews shown to 5 and then "click here to display all"