![]() |
Mod: Display number of reviews
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:
################### and then in skin1/customer/Modules/Customer_Reviews/reviews.tpl add the following code where you want to display the number: Code:
{$reviews_total} 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" |
Okay, I've figured out how to limit the number of reviews displayed and then have a link to show all.
In customer/vote.php find this: Code:
$reviews = func_query ("SELECT * FROM $sql_tbl[product_reviews] WHERE productid='$productid'"); replace with this: Code:
//for showing all reviews Then, in skin1/modules/Customer_Reviews/vote.tpl add this: If you have NOT used the mod listed in the first post then remove Code:
({$reviews_total} total) |
Great mod :)
|
Thanks for sharing this mod - fits what i was looking for perfectly.
|
All times are GMT -8. The time now is 07:28 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.