X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   If statement for reviews (https://forum.x-cart.com/showthread.php?t=41001)

flyclothing 07-09-2008 04:25 PM

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?

balinor 07-09-2008 04:41 PM

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!'

carpeperdiem 07-09-2008 04:51 PM

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!

balinor 07-09-2008 05:12 PM

Re: If statement for reviews
 
That's why they pay me the big bucks. Ha!

flyclothing 07-09-2008 10:41 PM

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.

flyclothing 07-11-2008 06:20 PM

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?


All times are GMT -8. The time now is 10:33 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.