[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Discount to subtotal
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]
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users