View Single Post
  #5  
Old 11-10-2006, 03:04 PM
 
jdiehl jdiehl is offline
 

eXpert
  
Join Date: Dec 2003
Location: Kansas City, MO
Posts: 270
 

Default Re: product rating for registered members only

It must be your lucky day. I'm working in a fresh X-Cart install and I'm feeling generous so I looked it up for you. Try this and see if it works:

Open /xcart/skin1/modules/Customer_Reviews/vote.tpl and in version 4.0.19 it is line 24-36, find the following:
Code:
<TR> <TD><BR>{$lng.lbl_customer_voting}</TD> <TD> <BR> <SELECT name="vote"> <OPTION value="" selected>{$lng.lbl_select_rating}</OPTION> <OPTION value="5">{$lng.lbl_excellent}</OPTION> <OPTION value="4">{$lng.lbl_very_good}</OPTION> <OPTION value="3">{$lng.lbl_good}</OPTION> <OPTION value="2">{$lng.lbl_fair}</OPTION> <OPTION value="1">{$lng.lbl_poor}</OPTION> </SELECT>&nbsp;<INPUT type="submit" value="{$lng.lbl_rate_it}"> </TD></TR></FORM>

And replace with this:
Code:
{if $login ne ""} <TR> <TD><BR>{$lng.lbl_customer_voting}</TD> <TD> <BR> <SELECT name="vote"> <OPTION value="" selected>{$lng.lbl_select_rating}</OPTION> <OPTION value="5">{$lng.lbl_excellent}</OPTION> <OPTION value="4">{$lng.lbl_very_good}</OPTION> <OPTION value="3">{$lng.lbl_good}</OPTION> <OPTION value="2">{$lng.lbl_fair}</OPTION> <OPTION value="1">{$lng.lbl_poor}</OPTION> </SELECT>&nbsp;<INPUT type="submit" value="{$lng.lbl_rate_it}"> </TD></TR>{/if}</FORM>

And that should work. I didn't try it myself though. Keep in mind that if you can also add an else statement to notify people that they must be logged in to set a rating.
__________________
Jason Diehl

Finding Cures for Your Online Headaches: http://www.internetmedicineman.com/
Reply With Quote