[ic] Simple if, why doesn't this work?

Gert van der Spoel gert at 3edge.com
Wed Jul 17 21:09:24 UTC 2013


> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-users-
> bounces at icdevgroup.org] On Behalf Of Mark Overmeer
> Sent: woensdag 17 juli 2013 23:02
> To: interchange-users at icdevgroup.org
> Subject: [ic] Simple if, why doesn't this work?
> 
> 
> Dear list,
> 
> I have spend a few hours in attempt to understand why this is not
> working, and I have not clue.  Could be very obvious to an gifted
> IC developer.
> 
> A form has a radiobutton list.  I try to fork between the four options,
> with the following code (including debug info)
> 
>         PAYNOW=[cgi paynow]<br>
>         PAYMETH=#[cgi paymethod]#<br>
> 
>         [if cgi paynow]
>           PAYNOW1=[cgi paynow]<br>
>           PAYMETH2=#[cgi paymethod]#<br>
>           [value name="mv_order_route" value="log" hide=1]
> 
>         %0 [cgi paymethod] %
>           [if cgi paymethod eq sofort]
>             [value name="mv_order_profile" value="sisow" hide=1]
>         SOFORT = [cgi paymethod]<br>
>           [/if]
> 
>         %1 [cgi paymethod]%
>           [if cgi paymethod eq ideal ]
>             [value name="mv_order_profile" value="sisow" hide=1]
>         IDEAL = [cgi paymethod], [cgi ideal_bank]<br>
>           [/if]
> 
>         %2 [cgi paymethod]%
>           [if cgi paymethod eq paypal ]
>         PAYPAL
>             [value name="mv_order_profile"       value="paypal" hide=1]
>             [value name="pp_use_billing_address" value="0"      hide=1]
>             [xbounce paypalsetrequest]
>           [/if]
> 
>         %3 [cgi paymethod]%
>           [if cgi paymethod eq vorkasse ]
>         VORKASSE = [cgi paymethod]<br>
>           [/if]
>         [/if]
> 
> Now, only paymethod="sofort" works.  It does not matter whether that
> if-block is at the top of the four, or anywhere else.  All other
> three options do never show their text!  I have tried quotes around
> the keywords, eq -> =  The do show the right value in the debug lines
> %0/%1/%2/%3
> 
> Anyone?

Try using [then]  

[if cgi paynow]
[then]
    .....
        [if cgi paymethod eq sofort]
        [then]
         ......
        [/then]
        [/if]
[/then]
[/if]


If my memory serves me right you use [then] in case you have nested ifs ..

CU,

Gert




More information about the interchange-users mailing list