BryanB Posted January 29, 2011 Share Posted January 29, 2011 I'm trying to do a simple {if} statement with the client's credit balance, basically I want to display something if their credit balance is greater than or equal to $50 on the clientareahome.tpl template. Here's what I have: {if $clientsstats.creditbalance >= '$50.00 USD'} Got here. {/if} Now everything works as expected, if the credit balance is less than $50, it doesn't display the "got here", if its $50-$99.99 it does display the "got here" however, if its $100 or more, it doesn't display... So for some reason it thinks that $100+ is less than $50 Any ideas why? Thanks 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted January 30, 2011 Share Posted January 30, 2011 because $1 is less than $5 dont do string comparisons - use some php to "cut" the number part of the string and use that 0 Quote Link to comment Share on other sites More sharing options...
BryanB Posted January 31, 2011 Author Share Posted January 31, 2011 got it. thanks 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.