[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
"currency convert" oddity or bug?
Hi,
I am trying to setup pages with multiple currencies, but in a slightly
different way than suggested in the minivend doc description of "setlocale".
The example has two separate item-lists, I want to use one item-list with
several
prices.
After having tried with a fixed second currency, and numerous experiments
and consulting the docs and mailing list archives, I think I found out what
is causing me problems:
the item-price (and possibly other currency-related fields) seems to become
"permanently" modified by the PriceDivide setting of the "current" (locale)
currency.
For better understanding, here some excerpts of my setup:
catalog.cfg contains currencies (here only the PriceDivide and currency_sign
lines, rest stripped):
Locale eur_EUR currency_symbol EUR
Locale eur_EUR PriceDivide 1.95583
Locale cz_CZ currency_symbol CZK
Locale cz_CZ PriceDivide 0.05
Locale en_US currency_symbol $
Locale en_US PriceDivide 1.75
Locale en_GB currency_symbol GBP
Locale en_GB PriceDivide 2.90
Locale de_DE currency_symbol DM
Locale de_DE PriceDivide 1
(prices in products.asc are in Deutschmarks)
pages/results.html contains in the search-list loop the following code to
display the prices (indented for better readability):
[data scratch mv_locale]
[item-price]
[setlocale currency=eur_EUR]
[currency convert=1]
[item-price noformat]
[/currency]
[setlocale currency=cz_CZ]
[currency convert=1]
[item-price noformat]
[/currency]
[setlocale currency=de_DE]
[currency convert=1]
[item-price noformat]
[/currency]
[setlocale]
</B><p>
when looking at the page in the browser, with different locales, it behaves
as following (aligned for better readability, always the same article,
currency precedes amount):
de_DE DM 19,90 EUR 10,17 CZK 398,00 CZK 19,90
en_GB GBP 6.86 EUR 3,51 CZK 137,24 DM 6,86
en_US $ 11.37 EUR 5,81 CZK 227,43 DM 11,37
cz_CZ KCS 398,00 EUR 203,49 EUR 7.960,00 DM 398,00
what it _should_ look like, in my opinion, is this:
de_DE DM 19,90 EUR 10,17 CZK 398,00 DM 19,90
en_GB GBP 6.86 EUR 10,17 CZK 398,00 DM 19,90
en_US $ 11.37 EUR 10,17 CZK 398,00 DM 19,90
cz_CZ KCS 398,00 EUR 10,17 CZK 398,00 DM 19,90
So, the converted prices have their PriceDivide applied to the [item-price],
which itself is already converted.
Further, the currency_sign is not switched when changing _to_ the locale in
mv_locale (or mv_currency, I tried that also).
Is there a way to achieve what I want?
MiniVend version 3.14-3
Perl version 5.005_03
Linux (Intel) RedHat, Kernel 2.2.5-15
Yours truly
Klaus