[ic] [if]???

Peter Jakl interchange-users@interchange.redhat.com
Tue Jan 29 10:32:01 2002


I'm not one of the "gurus" that should be handling this, but I'm always
working around code that I think should work. I bet the following will work:

[if type=explicit condition="$Scratch->{s_option_code} eq
$Scratch->{s_loop_code}"]
....

You could save one [seti] by doing:

[if type=explicit condition="$CGI->{option_code} eq
$Scratch->{s_loop_code}"]

If this doesn't work then there is no "loop-code" that is matching an
"option-code" or maybe it should be a numeric comparison (??) in which case
replace "eq" with "==".

Peter



-----Original Message-----
From: interchange-users-admin@interchange.redhat.com
[mailto:interchange-users-admin@interchange.redhat.com]On Behalf Of
pjohn@msn.com
Sent: Tuesday, January 29, 2002 7:35 AM
To: interchange-users@interchange.redhat.com
Subject: Re: [ic] [if]???


I did that and it still doesn't work.

I even try this

[if value "0404-LN" eq "0404-LN"]
...
[/if]

and

[if type="value" term="0404-LN" op="eq" compare="0404-LN"]
..
[/if]

they don't work.

This is the real script.

...
...
<select name="mv_sku" onChange="updateImg()">
<option value="">- select option -<br>
                  [loop search="
                        fi=options
                        se=[item-code]
                        sf=sku
                        se=1
                        sf=o_enable
                  "]
                  [seti option_select][/seti]
                  [seti s_option_code][cgi option_code][/seti]
                  [seti s_loop_code][loop-code][/seti]
                  [if type="value" term="[scratch s_loop_code]" op="eq"
compare="[scratch s_option_code]"]
                  <option value="[loop-code]" selected>[loop-field
description] ([currency][loop-field price][/currency])<br>
                  [else]
                  <option value="[loop-code]">[loop-field description]
([currency][loop-field price][/currency])<br>
                  [/else]
                  [/if]
                  [/loop]
                  </select>
...
...





--- Joachim Leidinger <jojo@blackpoint.de> wrote:
> pjohn@msn.com wrote:
> >
> > >
> > >> [if type=value term="loop-code" op="eq"
> compare="[cgi option_code]"]
> >
> > >What you want is probably: term="[loop-code]"
> >
> > thank you for trying to help, but that doesn't
> work either.
>
> Try
>
> [seti mycode][loop-code][/seti]
> [seti myoptcode][cgi option_code][/seti]
> TEST code: ([scratch mycode])<BR>
> TEST optcode: ([scratch optcode])<BR>
> [if type=value term="[scratch mycode]" op="eq"
> compare="[scratch
> optcode]"]
>
> and see, what you get and try out, what is going
> wrong!
>
> Joachim
>
> --
> Hans-Joachim Leidinger | Dipl.-Phys.Ing. Entwicklung
> eCommerce
> [Hans-Joachim.leidinger@bpanet.de]
> Black Point Arts Internet Solutions GmbH
> http://www.bpanet.de
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users


_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users