[ic] Displaying a text message, instead of $0.00, for zero priced items?

Kevin Walsh interchange-users@interchange.redhat.com
Fri Apr 5 20:11:01 2002


> 
> How does one go about displaying a text message, instead of $0.00, for zero
> priced items?
> 
> I tried the following code within results.html and found that the text
> message P.O.A is never displayed when the item was zero priced.
> 
> <td align="center">
>     [if [item-price] =~ 0]
>         [item-price]
>     [else]
>         P.O.A.
>     [/else]
>     [/if]
> </td>
> 
How about this:

    [tmp tmp_price][price code="[item-code]" noformat=1][/tmp]
    [if scratch tmp_price]
        [currency][scratch tmp_price][/currency]
    [else]
        Oops, we forgot.
    [/else]
    [/if]

Or you could hard code the currency format to USD (or whatever)
and do this:

    [tmp tmp_price][item-price][/tmp]
    [if scratch tmp_price ne "$0.00"]
        [scratch tmp_price]
    [else]
        Its free - order it and see if we notice.
    [/else]
    [/if]

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/