[ic] Discount to subtotal
Thomas N. Stefanidis
thomas@prometheas.gr
Mon, 12 Feb 2001 12:47:31 +0200
How can i make a discount like this?
from 20.000 till 49.999 5%
from 50.000 till 99.999 10%
form 100.000 from 249.999 12%
form 250.000 and over 15%
I have found this code but i don't know how to change it with my values
:
[discount ENTIRE_ORDER]
$original = $s;
$f =($s);
if ($s <= 2499.99) {
$discounted = $s * .93;
} elsif ($s <= 4999.99) {
$discounted = $f * .88;
} elsif ($s <= 9999.99) {
$discounted = $f * .83;
} elsif ($s <= 19999.99) {
$discounted = $f * .81;
} elsif ($s >= 20000.00) {
$discounted = $f * .78;
}
$difference = $original - $discounted;
return $discounted;
[/discount]