[ic] Re: price display problem

Mike Heins mikeh@minivend.com
Sat, 11 Nov 2000 14:35:41 -0500

Quoting Toni Mueller (support-ic@oeko.net):
> 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]

This is exactly what I am saying. The amount is generated at [item-list]
time, and preceding it with a setlocale will make zero difference.

You can do almost anything you want with embedded Perl:

[setlocale eu_EU]
	my $line = [item-increment];
	my $cart = $Carts->{main};
	$cart->[$line]{eu_price} = q{[item-price]};
	$cart->[$line]{eu_subtotal} = q{[item-subtotal]};

[setlocale de_DE]

[item-code]--DE: [item-quantity]@[item-price] = [item-subtotal]
[item-code]--EU: [item-quantity]@[item-modifier eu_price] = [item-modifier eu_subtotal]

The problem with [item-subtotal noformat=1] is a bug. [item-subtotal noformat]
will work. Bug will be fixed in CVS shortly.

Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <heins@akopia.com>

If you think nobody cares if you're alive, try missing a couple of
car payments.  -- Earl Wilson