[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Why wont this work.. Entire order discount..
(trying to discount entire order by 10% if over 500.00 and
by 5% if over 200 and 0 if below that...
Is there just a better way and I'm missing it?
On my basket page I have...
-Snip-just before I display the subtotal
[subtotal] # this if for troubleshooting the code below
[if explicit]
[condition]
$var = "[subtotal noformat=1]";
if ($var gt 500){
return 1;}
else{
return 0;}
[/condition]
[discount ENTIRE_ORDER] $s * .90 [/discount]
[else]
[if explicit]
[condition]
$subtotal = '[value subtotal]';
return 1 if $subtotal > '200'; #just to try a different formula
return 0;
[/condition]
[discount ENTIRE_ORDER] $s * .95 [/discount]
[else]
[discount ENTIRE_ORDER][/discount]
[/else
[/if]
[/else]
[/if]
[subtotal] # this if for troubleshooting the code to see if it worked
-End Snip-
I also added a [discount ENTIRE_ORDER][/discount] at the beginning of the
page
to clear it on opening the page.
Any Ideas?
-Richard Teachout
richt@teachout.com