
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] !! discount prices in steps !! HELP
OK, let's see if I can get this right now.
> admin wrote:
> >
> > i need help to find a solution to display discount prices from
> > total-prices in several steps.
> >
> > from 500 DM up to 1000 DM 1%
> > from 1000 DM up to 1500 DM 3,5 %
> > from 2000 DM up to endless 5,5 %
>
> Note: I'm going to assume the 2000 is a typo and should have read 1500.
>
> [discount ENTIRE_ORDER]
> my $perc;
> if ($s >= 1500) {
> $perc = 0.055;
> }
> elsif ($s >= 1000) {
> $perc = 0.035;
> }
> elsif ($s >= 500) {
> $perc = 0.01;
> }
>
unless ($perc) {
delete $Scratch->{discount_amount};
return $s;
}
return $Scratch->{discount_amount} = $s - $s * $perc;
> [/discount]
>
Sorry about that.
--
Mark Johnson
Senior Systems Architect - Professional Services
Red Hat, Inc.
E-Business Solutions
markj@redhat.com
703-456-2912
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users