fmeos Posted January 23, 2011 Share Posted January 23, 2011 Can anyone please let me know the whmcs conditional display operators for == (Equal) || (OR) != (Not Equal) Contains 0 Quote Link to comment Share on other sites More sharing options...
gk-root Posted January 23, 2011 Share Posted January 23, 2011 {if $var eq "Text" or $var eq "Text"}{/if} {if $var neq "Text"}{else}{/if} http://www.smarty.net/docsv2/en/language.function.if.tpl 0 Quote Link to comment Share on other sites More sharing options...
fmeos Posted January 27, 2011 Author Share Posted January 27, 2011 Thanks for link 0 Quote Link to comment Share on other sites More sharing options...
mikie Posted April 1, 2011 Share Posted April 1, 2011 (edited) The above conditional operators do not work. What is the conditional operators for GT and LT? Its not > or < because iv tried those they those dont work. Im seeing the following error in my log Smarty Error: [in emailtpl:emailmessage line 9]: syntax error: unidentified token ' !=' (Smarty_Compiler.class.php, line 1410) The condition is very easy {if $client_credit > "0"} do something {else} do something else {/if} likewise {if $client_credit > "0"} It fails {if $client_credit gt "0"} It fails too {if $client_credit gt 0} it fails any ideas why nothing works? Is EQ the only operator supported? Edited April 1, 2011 by mikie 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted April 1, 2011 Share Posted April 1, 2011 (edited) So what is the numerical value of $client_credit if its like "$2.55 USD" this is a text string and not a number, so how can a text string be < or > 0 when referencing 0 as a number. BOTH fields need to be numerical 0 can also be FALSE (or not true) so if there is a text value it won't work unless the variable is empty Edited April 1, 2011 by sparky 0 Quote Link to comment Share on other sites More sharing options...
mikie Posted April 1, 2011 Share Posted April 1, 2011 Fair enough a more accurate representation should have been posted; eg != to blank. Would mean if its not blank there is a balance. 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.