MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Problems with [if] and [total-cost]



On 11 Nov, Reuven M. Lerner wrote:
> ******    message to minivend-users from "Reuven M. Lerner" <reuven@lerner.co.il>     ******
> 
> Israeli credit cards allow customers to pay in installments
> ("tashlumim") if the price of an item is over a certain amount.  If
> the price is more than 150 shekels, they can choose whether to pay in
> 1 or 2 installments, and if the price is more than 250 shekels, they
> use up to three installments.
> 
> I have been trying to get a simple if-then statement to work, based on
> the current total cost.  I figured out how to get a numeric version of
> the total cost, [total-cost noformat=1], but for some reason I can't
> get the [if] to work correctly.
> 
> I want to do something like this:
> 
>     <input type="radio" name="tashlumim" value="1" checked> 1
> 
>     [if value 150 < [total-cost noformat=1]]
>     <input type="radio" name="tashlumim" value="2"> 2
>     [/if]
> 
>     [if value 250 < [total-cost noformat=1]]
>     <input type="radio" name="tashlumim" value="3"> 3
>     [/if]
> 
> I've tried lots of different variations on the above, and none seems
> to work.  I know that it must be possible, but what am I doing wrong?
> 
> Thanks for any and all help!
> 
> Reuven

Try

[if type=explicit compare="[calc] [total-cost noformat=1] < 150 [/calc]"]
     <input type="radio" name="tashlumim" value="2"> 2
[/if]


Regards,

Joachim
-- 
Hans-Joachim Leidinger
buch online                 jojo@buchonline.net
Munscheidstr. 14            FAX: +49 209 1971449
45886 Gelsenkirchen



Search for: Match: Format: Sort by: