[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
RE: [mv] SOLVED: problems calculating subtotal for order with discounts
i finally figured it out:
[currency][calc]
my $st =
[item-list]
([discount-price noformat] * [item-quantity]) +
[/item-list]
0;
return $st;
[/calc][/currency]
will return a correct subtotal for all your items including any discounts.
HOORAY!
mike k.
>
> > -----Original Message-----
> > From: owner-minivend-users@minivend.com
> > [mailto:owner-minivend-users@minivend.com]On Behalf Of kenshin
> > Sent: Wednesday, November 03, 1999 11:15 PM
> > To: minivend-users@minivend.com
> > Subject: [mv] problems calculating subtotal for order with discounts
> >
> >
> > ****** message to minivend-users from "kenshin"
> > <kenshin@planetanime.com> ******
> >
> > It's been a really long night and any help on this would be REALLY
> > appreciated.
> >
> > I've been over and over the docs and it keeps getting more and more
> > confusing.
> >
> > The problem i'm trying to solve is this:
> > i'm setting a discount based on a code like this:
> > [item-list]
> > [discount code="[item-code]"]
> > return ($s - [item-field sale_price]) if
> > q{[item-field sale]} ==
> > 1;
> > [/discount]
> > [/item-list]
> >
> > this all works fine, but using the [subtotal] tag i get only 1 item
> > discounted if there are multiple quantities ordered of the
> > same product
> > code. e.g.
> >
> > regular price: 29.99
> > quantity 1 ----- subtotal: 24.00
> > quantity 2 ----- subtotal: 53.99
> > quantity 3 ----- subtotal: 83.98
> > etc.
> >
> > I know there must be a simple solution to this that i'm
> > overlooking but i
> > can't seem to find it.
> >
> > Any and all help is appreciated.
> >
> > Thank you
> > mike k.
> >
> > -
> > To unsubscribe from the list, DO NOT REPLY to this message.
> > Instead, send
> > email with 'UNSUBSCRIBE minivend-users' in the body to
> > Majordomo@minivend.com.
> > Archive of past messages:
> http://www.minivend.com/minivend/minivend-list
>
> -
> To unsubscribe from the list, DO NOT REPLY to this message.
> Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to
> Majordomo@minivend.com.
> Archive of past messages:
> http://www.minivend.com/minivend/minivend-list
>