[ic] Discount price and display price

Stefano Malagoli interchange-users@interchange.redhat.com
Thu Aug 16 11:17:01 2001


Hi all,
my item have a standard price and on some condition can have a lower price.
In my basket I put this to compute discount

[if-item-data <condition>]
                [discount code="[item-code]"] $q * [item-data merchandising
promo_price] [/discount]
[else]
   [discount code="[item-code]"][/discount]
[/else]

(it's ok ?)
then, while displaying item, for discounted one I use this tag to show the
original price e and the new price (I get them from the construct demo):
[item-price] for original price of one item
[discount price] for new discounted price on one item
[item-difference] the difference

[item-subtotal] the original price of all ordered item
[item-discount-subtotal] the new discounted price of all ordered item
[item-discount] then difference

Here one ex.
Price: 2598997
Discounted price: 2078992
Quantity: 6
(in the above order)
2598997       ok
12473952     NOT ok (expected 2078992)
-9874955      NOT ok (expected 520005)

15593982     ok
12473952     ok
-59249730    NOT ok (expected 3120030)

with this number seem that the discount tag is used as a single item price,
but in the manual (Interchange Tags 2.20.2. Discount tag description) I see
that "In the case of the item and all items discount, the formula must
evaluate to a new subtotal for all items of that code that are ordered."

Someone have suggestion ?

TIA

Best Regards,

Dott. Stefano Malagoli
Resp. Sviluppo Software
----------------------------------------
DATACODE s.r.l.
Via S. Morse, 30
41100 Modena (Italy)
tel. +39.059.212831 fax +39.059.4390212
E-mail: s.malagoli@datacode.it
Web: www.datacode.it