[ic] [if] statements with numerical values
Donald Lin
interchange-users@lists.akopia.com
Thu Jul 26 17:43:00 2001
I am using IC 4.6.5 and am having trouble with [if] statements
I am trying to determine whether the subtotal is above 20 dollars.
I have included the code below. Can anyone help?
[if explicit]
[condition]
$subtotal = '[subtotal noformat=1]';
if( $subtotal < 20 ) { return 1; } else {return 0;}
[/condition]
subtotal is less than 20
[/if]
I also tried the above statement with the [else] statements included, and I
get something displayed on the html. It is:
[condition] $a = '10'; return 1; [/condition] value is 1
What is wrong?? Is there any other way I can do it?
Donald