[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] If statement help
The following code snippet is from the standard results.html page running
on version 4.8.6:
[if session browser =~ /mac/]
<input type=submit value="[L]Buy now[/L]"
<input type=submit value="[L]Buy now[/L]"
onClick="this.form.mv_oi[item-increment].value='[item-code]'" border=0>
[else]
[if explicit]
[condition]
$cat = '[item-field prod_group]';
return 1 if $cat eq "Training";
return 0;
[/condition]
<input type=image src="__THEME_IMG_DIR__reg_now.gif" onClick
="this.form.mv_oi[item-increment].value='[item-code]'" border=0>
[else]
<input type=image src="__THEME_IMG_DIR__buynow.gif" onClick
="this.form.mv_oi[item-increment].value='[item-code]'" border=0>
[/else]
[/if]
[/else]
[/if]
The code seems to run fine except for the first line returned in the search
always returns the " __buynow.gif" button (the [else] option from the [if
explicit] statement) when searching out a list of "Training" prod_group
items. After the first line all subsequent lines show the correct button "
__reg_now.gif" in association with items from the "Training" prod_group.
I am at a loss to explain this behaviour. Any ideas?
Thanks in advance,
Gary Benson
Geton.com Technologies
Email: gary@geton.com