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

If statement for reviews

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-09-2008, 04:25 PM
  flyclothing's Avatar 
flyclothing flyclothing is offline
 

eXpert
  
Join Date: Aug 2004
Location: Gilbert, AZ
Posts: 357
 

Default If statement for reviews

I would like to add a statement to customer reviews that says "Be the first to review this product!" if there are no reviews yet. I currently have this if statement added, but can't seem to get it to work:

{if $config.Customer_Reviews.customer_voting eq "Y"} {include file="modules/Customer_Reviews/votes.tpl"}{else}{$lng.lbl_be_first} {/if}

Here is a sample product page:

http://www.flyclothing.com/Fender-Skull-Buckle-pr-22177.html

Anyone have an idea how to do this? While I am at it, how about showing the number of reviews next to a product?
__________________
Jonathan
Flyclothing, LLC
PO Box 1490
Gilbert, AZ 85299-1571
P 480.422.7350
F 888.359.2568
www.flysportsgear.com?MMCF_xcartforum (X-Cart 4.5.2) FOR SALE
Reply With Quote
  #2  
Old 07-09-2008, 04:41 PM
 
balinor balinor is offline
 

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

Default Re: If statement for reviews

There is already default text in there when there are no reviews - it says 'no reviews' I believe. Just change that language variable to say 'Be the first to review this product!'
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 07-09-2008, 04:51 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: If statement for reviews

Quote:
Just change that language variable to say 'Be the first to review this product!'

Uh, duh... why didn't I do this 18 months ago?

GREAT suggestion!
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #4  
Old 07-09-2008, 05:12 PM
 
balinor balinor is offline
 

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

Default Re: If statement for reviews

That's why they pay me the big bucks. Ha!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 07-09-2008, 10:41 PM
  flyclothing's Avatar 
flyclothing flyclothing is offline
 

eXpert
  
Join Date: Aug 2004
Location: Gilbert, AZ
Posts: 357
 

Default Re: If statement for reviews

Thanks for the help. I guess what I meant to say was how to you do the same thing for the voting. I copied the rating stars and placed them right below the description, but nothing shows unless someone votes. I would like it to say "Be the...." here.
__________________
Jonathan
Flyclothing, LLC
PO Box 1490
Gilbert, AZ 85299-1571
P 480.422.7350
F 888.359.2568
www.flysportsgear.com?MMCF_xcartforum (X-Cart 4.5.2) FOR SALE
Reply With Quote
  #6  
Old 07-11-2008, 06:20 PM
  flyclothing's Avatar 
flyclothing flyclothing is offline
 

eXpert
  
Join Date: Aug 2004
Location: Gilbert, AZ
Posts: 357
 

Default Re: If statement for reviews

I think I am very close to figuring this out, but haven't figured what $vote should not equal. Here is the equation:

{if $vote ne ""}{include file="modules/Customer_Reviews/votes.tpl"}{else}{$lng.lbl_be_first} {/if} - THIS ALLOWS THE LABEL TO SHOW UP, BUT NOT THE VOTES.

If you change {if $vote ne ""} to {if $vote ne "0"} the votes show up, but the label doesn't show.

Any advice?
__________________
Jonathan
Flyclothing, LLC
PO Box 1490
Gilbert, AZ 85299-1571
P 480.422.7350
F 888.359.2568
www.flysportsgear.com?MMCF_xcartforum (X-Cart 4.5.2) FOR SALE
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 02:56 AM.

   

 
X-Cart forums © 2001-2020