![]() |
voting with based on xxx votes?!?
Hi there!
I asked myself if there is a nice way to put a txt beside the voting-stars with something like "based on xxx votes"?! A five-star-rating is nothing, if there is only one voting ;) Cheers, Mickna |
Done!
I think this should work: Have to hack customer/vote.php. Insert the line $smarty->assign ("vote_total", $vote_result["total"]); Code:
..... Next open /modules/Customer_Reviews/vote.tpl and insert: {$lng.lbl_votetotal_1} {$vote_total} {$lng.lbl_votetotal_2} after the stars: Code:
Well and then open the language in the admin-section and add two new fields: Code:
lbl_votetotal_1 | Based on | Based on Think this is right :) Cheers, mickna |
In vote.tpl you could alternatively add the following to determine plurality of review(s).
Code:
{$lng.lbl_votetotal_1} {$vote_total} {if $vote_total > 1} {$lng.lbl_votetotal_2|cat:"s"}{else}{$lng.lbl_votetotal_2}{/if}. Probably wouldn't work so great with languages other than English, so you if you go this route you may just want to create two seperate language variables, 'review' and 'reviews' which would end up something like... Code:
{$lng.lbl_votetotal_1} {$vote_total} {if $vote_total > 1} {$lng.lbl_votetotal_2}{else}{$lng.lbl_votetotal_2_plural}{/if}. Heh...well anyway, there's my two cents. :lol: |
Great mod contribution for any cart, thanks for sharing with us all.
|
All times are GMT -8. The time now is 06:03 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.