[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] problem with item modifier
>
> This is probably a simple question and yet I couldn't find an answer in
> the archives or in the documentation.
>
Not even in the [if] section of the tags reference?
>
> I've been banging my head trying
> to figure out why I can't get a simple "Y" or "N" item modifier to work
> in my catalog.
>
> In ord/checkout.html, the following code is used to display a checkbox
> that sets a modifier called "hotdip":
>
> <INPUT TYPE="checkbox" NAME="[modifier-name hotdip]" value="Y">
>
> I can't print the value of the modifier ("Y" or NULL) in
> etc/receipt.html without a problem, but what I want is to print "Y" if
> the modifer is present (they checked the box) or "N" if the modifier
> isn't present. This is important because it also needs to go into an
> export file I am creating for my customer's inventory and ordering
> system.
>
> I've tried things like:
> [if value [item-modifier hotdip]] Y [else] N [/else][/if]
> [if-modifier hotdip] Y [else] N [/else][/if]
>
> But I can't get anything to work properly. Can anyone help me with this
> silly problem?
>
[if term="[item-modifier hotdip]" op="eq" compare="Y"]Y[else]N[/else][/if]
If your modifier really is 'Y' or NULL/blank, you could do this:
[either][item-modifier hotdip][or]N[/either]
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/