[ic] Re: price display problem

Toni Mueller support-ic@oeko.net
Mon, 13 Nov 2000 15:19:42 +0100


(i reformatted the text a bit for legibility)

On Sun, Nov 12, 2000 at 11:42:03PM +0100, draftd wrote:
> I'm a bit curious to see if you figured out what your problem
> with [subtotal] was. I think I am experiencing the same problem:
> interchange displays the subtotal correctly with the default
> locale (euro), but using another locale gives problems only
> with [subtotal]. other tags don't give problems.

after Mike Heins fixed a minor bug in the speed of light, the
current state of affairs is that I can now say:

[setlocale de_DE][item-subtotal][setlocale]<br>
[setlocale de_EU]
	[currency convert=1][item-subtotal noformat=1][/currency]

and have both the DEM and EURO prices displayed. I can also
do this for [item-price] (I was only unaware that "boolean"
options don't need that "=1" after them to work).

What doesn't work, however, is [subtotal] which displays
the amount in EURO, no matter what locale setting are
active at that point. The locale setting only changes the
currency denomination, and (even worse) setting it to
de_EU and saying the verse like above results in the
display of an amount that is about the numeric _quarter_
of the DEM number. I don't know where it goes wrong,
however. I _can_ display the correct values using
[calc]... * 1.95583[/calc], but that's a kludge, not a
solution (what gets entered into "orderline"?).

Btw, as far as I understood, the discounting is done by
the subroutine item_price in /lib/Vend/Data.pm or so?
There is a snippet of code that looks up some quantity
pricing etc, so the [item-subtotal] can simply do
[item-price]*[item-count], having the item-price
adjusted already before.

Best Regards,