![]() |
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? |
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!'
|
Re: If statement for reviews
Quote:
Uh, duh... why didn't I do this 18 months ago? GREAT suggestion! |
Re: If statement for reviews
That's why they pay me the big bucks. Ha!
|
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.
|
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.