Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

product rating for registered members only

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-09-2006, 05:08 PM
  razorblade's Avatar 
razorblade razorblade is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 39
 

Default product rating for registered members only

i have searched the forum and can't find an answer. i do not want anyone who visits my site to be able to rate a product. how do i make this feature only available to members that are signed into their account?
__________________
/razorblade pro/
v 5.2.21
linux 2.2.29
Reply With Quote
  #2  
Old 11-09-2006, 06:38 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: product rating for registered members only

There isn't a setting in admin for that, only for adding reviews. You would need to tweak the code to hide the rating option for non-logged in people.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 11-10-2006, 11:37 AM
 
jdiehl jdiehl is offline
 

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

Default Re: product rating for registered members only

And it shouldn't very hard. Look at the code for the auth panel that shows a logout button, it obviously only displays if someone is logged in.
__________________
Jason Diehl

Finding Cures for Your Online Headaches: http://www.internetmedicineman.com/
Reply With Quote
  #4  
Old 11-10-2006, 12:15 PM
  razorblade's Avatar 
razorblade razorblade is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 39
 

Default Re: product rating for registered members only

Quote:
Originally Posted by jdiehl
And it shouldn't very hard. Look at the code for the auth panel that shows a logout button, it obviously only displays if someone is logged in.

thanks, i checked it out, but honestly i am a ant in the world of xcart. any mod i incorpaorate has only come from detailed instructions, blind luck, or trial and error. and i am terrified of wrecking my xcart.

could you possibly be a little more specific as to which templates and what i need to change. if not no biggy, thanks!
__________________
/razorblade pro/
v 5.2.21
linux 2.2.29
Reply With Quote
  #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
  #6  
Old 11-13-2006, 02:47 PM
  razorblade's Avatar 
razorblade razorblade is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 39
 

Default Re: product rating for registered members only

worked like a charm. but the lbl_customer_voting causes the word "Voting" to appear twice. so i created a new one called

lbl_customer_votinglimit

"Voting - members only"

and change the first lbl_customer_voting to lbl_customer_votinglimit

looks great. (and i think i am finally starting to see how it all works)

thanks!
__________________
/razorblade pro/
v 5.2.21
linux 2.2.29
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:29 AM.

   

 
X-Cart forums © 2001-2020