[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] v3.12 perl code in calc tag
Can anyone tell me why the following code ALWAYS resolves to the
$mx = .9 else statement no matter what the [subtotal] for the order
is?
[set name=sbt interpolate=1][subtotal noformat=1][/set]
[calc arg=scratch]
$mx = 1;
if ($Safe{scratch}->{sbt} >= 500.00) {
$mx = .75;
} elsif ($Safe{scratch}->{sbt} >= 350.00) {
$mx = .8;
} elsif ($Safe{scratch}->{sbt} >= 250.00) {
$mx = .85;
} else {
$mx = .9;
}
[/calc]
[discount ALL_ITEMS]
return ($s * $mx);
[/discount]
The docs clearly state that all (safe) perl constructs work with
the [perl] tag and that the [calc] tag works same as the [perl]
tag but with persistent variables so why won't this snippet work?
-cb
--
==================-
charlie blanchard
626.447.3092
public key at:
http://blanchardsite.com
=========================-
PGP signature