[ic] Re: price display problem

Toni Mueller support-ic@oeko.net
Sat, 11 Nov 2000 19:55:54 +0100


Hello,

On Sat, Nov 11, 2000 at 10:04:17AM -0500, Mike Heins wrote:
> Quoting Toni Mueller (support-ic@oeko.net):
> > In the left column where the price per article is displayed,
> > everthing looks nice. In the column to the right where the
> > subtotals are, there I find the following problems:
> I think the problem is the iterating lists which perhaps don't 
> produce their values like you think.

> For instance
> 	[item-list]
> 		[item-code] 
> 
> 			Standard: [item-price]
> 		    [setlocale eu_EU]
> 			Euro: [item-price]
> 		    [setlocale]
> 	[/item-list]
> 
> will not work, because [item-price] is done at [item-list] time.

thank you... well, I have:

[setlocale de_DE][item-price][setlocale]<br>
[setlocale de_EU][currency convert=1][item-field price][/currency]

in the column where the price per item is displayed, and this works.

But I'm still struggling with [item-subtotal]
which doesn't accept a noformat=1, and with [subtotal], which
has the amount in EURO, but displays as DM.

So my questions are more where [item-subtotal] and [subtotal]
are generated, and why/how the wrong amount slips in there...
Your suggestion also exhibits the problem that the subtotals
are counted in the wrong currency and thus come out low.

Also, using the suggestion using [price code="[item-code]"]
doesn't work since the second item now displays two identical
amounts. Adding

Locale		de_EU PriceDivide	  1

and wrapping the DM price up like

[setlocale de_DE] [item-price] [setlocale]

didn't help a bit and displayed also the EURO amount, but
designated as DM. The following code displays two
identical numbers, only with a different currency designation:

[setlocale de_DE] [price code="[item-code]"] [setlocale]
[setlocale de_EU] Euro: [price code="[item-code]"] [setlocale] 

whereas the following code displays the correct (adjusted)
amounts:

[setlocale de_DE] [item-price] [setlocale]
[setlocale de_EU] Euro: [price code="[item-code]"] [setlocale] 

as does

[setlocale de_DE] [item-price] [setlocale]
[setlocale de_EU]
	Euro: [currency convert=1][item-price noformat=1][/currency]
[setlocale] 

I like the latter formula better for it's structured appearance, though.

Currently I'm digging up lib/Vend in order to find the place where
I can add a 'noformat' attribute to [item-subtotal]. This seems to
be the cleanest way to do, imho.


Best Regards,
--Toni++