Jump to content

whmcs conditional display operators


fmeos

Recommended Posts

  • 2 months later...

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 by mikie
Link to comment
Share on other sites

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 by sparky
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated