[ic] small if query

Michael Goldfarb interchange-users@icdevgroup.org
Thu Feb 6 12:58:01 2003


>I am implementing a minimum order statement for the store so it will
>prevent
>orders under a certain value from going though the checkout.
>
>I need to write a query as below
>
>[if [total-cost] >= '15']
>shop
>[else]
>no shop
>[/else]
>[/if]
>
>Obviously that isn't right. Can someone point out what's wrong.
>Thanks - i'm getting really into how straight forward ic is (when you
know
>how things work).
>
>BTW ive already looked at this but i am only a mortal;-)
>
>http://www.icdevgroup.org/doc-5.0/frames/ictags_72.html
>
>thanks.


As with most things in IC, there are a number of ways to handle
solutions for questions.

You can set [total-cost] as a scratch variable and then compare the
value of the scratch variable like this:

[tmp order_total][total-cost noformat=1][/tmp]

[if type="scratch" term="order_total" op="gt" compare="15"]
shop
[else]
no shop
[/else]
[/if]