Hello everyone,
The other day I tested the Locale-sensitive functionality of the ecommerce app. For that, I picked a couple of items from the catalog to which I added additional prices in Swedish krona (SEK) and switched locale from English to Swedish. There seem to be a cache issue which prevents the correct display of the locale-sensitive price and currency. For our discussion assume that our item costs $100.00 or 700,00 kr (swedish korna). After swithcing to the Swedish locale the new price string becomes corrupted; for example $100.00 becomes SKr100,00. There 2 errors whit this output:
Obviously this is due to the caching in the Entity Engine (pls see this
thread) and probably even
FreeMarker since <@ofbizCurrency> is a
TemplateTransformModel.
My question are:
Appreciate your
time.
</Firas> _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
Yes,
I too have recently noticed something similar: switching from Italian to English language and the $ symbol was rendered as US$ The Freemarker's ?string.currency built-in is not an option because it doesn't consider the currency of the data bau the currency of the session. Jacopo Firas A. wrote: > Hello everyone, > > The other day I tested the Locale-sensitive functionality of the > ecommerce app. For that, I picked a couple of items from the catalog to > which I added additional prices in Swedish krona (SEK) and switched > locale from English to Swedish. > > There seem to be a cache issue which prevents the correct display of the > locale-sensitive price and currency. For our discussion assume that our > item costs $100.00 or 700,00 kr (swedish korna). After swithcing to the > Swedish locale the new price string becomes corrupted; for example > $100.00 becomes SKr100,00. There 2 errors whit this output: > > 1. the Swedish currency symbol is postfix 'kr' and not 'SKr'(prefix) > 2. the decimal separator (',') is OK but the price is numerically > still in dollars (100 instead of 700). > > Obviously this is due to the caching in the Entity Engine (pls see this > thread <http://lists.ofbiz.org/pipermail/dev/2005-August/009003.html>) > and probably even FreeMarker since <@ofbizCurrency> is a > TemplateTransformModel. > > My question are: > > 1. Is there a way of clearing the cache in question programmatically? > 2. Why use <@ofbizCurrency> when FreeMarker's already supports > locale-sensitive currency formatting through var?string.currency > (one of it's built-ins for numbers)? > > Appreciate your time. > > </Firas> > > > ------------------------------------------------------------------------ > > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
Hi,
I think FreeMarker guys have foreseen a scenario where one would want an output in a locale other than Session's, like this: <#setting locale="${yourLocaleStr}"> ${price.listPrice} Any ideas on cache clearing? </Firas> -----Original Message----- From: Jacopo Cappellato [mailto:[hidden email]] Sent: den 21 oktober 2005 12:39 To: OFBiz Project Development Discussion Subject: Re: [OFBiz] Dev - Locale-sensitive functionality - thoughtsand questions Yes, I too have recently noticed something similar: switching from Italian to English language and the $ symbol was rendered as US$ The Freemarker's ?string.currency built-in is not an option because it doesn't consider the currency of the data bau the currency of the session. Jacopo Firas A. wrote: > Hello everyone, > > The other day I tested the Locale-sensitive functionality of the > ecommerce app. For that, I picked a couple of items from the catalog > to which I added additional prices in Swedish krona (SEK) and switched > locale from English to Swedish. > > There seem to be a cache issue which prevents the correct display of > the locale-sensitive price and currency. For our discussion assume > that our item costs $100.00 or 700,00 kr (swedish korna). After > swithcing to the Swedish locale the new price string becomes > corrupted; for example $100.00 becomes SKr100,00. There 2 errors whit this > > 1. the Swedish currency symbol is postfix 'kr' and not 'SKr'(prefix) > 2. the decimal separator (',') is OK but the price is numerically > still in dollars (100 instead of 700). > > Obviously this is due to the caching in the Entity Engine (pls see > this thread > <http://lists.ofbiz.org/pipermail/dev/2005-August/009003.html>) > and probably even FreeMarker since <@ofbizCurrency> is a > TemplateTransformModel. > > My question are: > > 1. Is there a way of clearing the cache in question programmatically? > 2. Why use <@ofbizCurrency> when FreeMarker's already supports > locale-sensitive currency formatting through var?string.currency > (one of it's built-ins for numbers)? > > Appreciate your time. > > </Firas> > > > ---------------------------------------------------------------------- > -- > > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
I still haven't seen anything that appears to be a stale cache effect, but on the FreeMarker issue... We don't want something that automatically selects the currency based on locale. We have data structures that consist of pairs of fields including currency amounts and currency UOM IDs so what we need is to be able to specify both the amount and the currency used each time one of these values is displayed. That is why we have the ofbiz currency transform. Chances are if something is not displaying a price correctly then it is not getting the currency UOM correctly, or perhaps it is using the ?string.currency built-in instead of the ofbiz currency transform. We eliminated all uses of ?string.currency a while back, but it is possible some have crept back in. So, to trace this down, where are you seeing this effect? What you describe is what would happen if the ?string.currency built-in was used (ie the wrong currency is displayed). What Jacopo described is totally different and is what should happen with the ofbiz currency transform (ie the proper currency is display, it is just formatted differently for the locale). -David On Oct 22, 2005, at 4:58 AM, Firas A. wrote: > Hi, > > I think FreeMarker guys have foreseen a scenario where one would > want an > output in a locale other than Session's, like this: > > <#setting locale="${yourLocaleStr}"> > ${price.listPrice} > > Any ideas on cache clearing? > > </Firas> > > -----Original Message----- > From: Jacopo Cappellato [mailto:[hidden email]] > Sent: den 21 oktober 2005 12:39 > To: OFBiz Project Development Discussion > Subject: Re: [OFBiz] Dev - Locale-sensitive functionality - > thoughtsand > questions > > Yes, > > I too have recently noticed something similar: switching from > Italian to > English language and the $ symbol was rendered as US$ The Freemarker's > ?string.currency built-in is not an option because it doesn't > consider the > currency of the data bau the currency of the session. > > Jacopo > > > Firas A. wrote: > >> Hello everyone, >> >> The other day I tested the Locale-sensitive functionality of the >> ecommerce app. For that, I picked a couple of items from the catalog >> to which I added additional prices in Swedish krona (SEK) and >> switched >> locale from English to Swedish. >> >> There seem to be a cache issue which prevents the correct display of >> the locale-sensitive price and currency. For our discussion assume >> that our item costs $100.00 or 700,00 kr (swedish korna). After >> swithcing to the Swedish locale the new price string becomes >> corrupted; for example $100.00 becomes SKr100,00. There 2 errors >> whit this >> > output: > >> >> 1. the Swedish currency symbol is postfix 'kr' and not >> 'SKr'(prefix) >> 2. the decimal separator (',') is OK but the price is numerically >> still in dollars (100 instead of 700). >> >> Obviously this is due to the caching in the Entity Engine (pls see >> this thread >> <http://lists.ofbiz.org/pipermail/dev/2005-August/009003.html>) >> and probably even FreeMarker since <@ofbizCurrency> is a >> TemplateTransformModel. >> >> My question are: >> >> 1. Is there a way of clearing the cache in question >> programmatically? >> 2. Why use <@ofbizCurrency> when FreeMarker's already supports >> locale-sensitive currency formatting through var? >> string.currency >> (one of it's built-ins for numbers)? >> >> Appreciate your time. >> >> </Firas> >> >> >> --------------------------------------------------------------------- >> - >> -- >> >> >> _______________________________________________ >> Dev mailing list >> [hidden email] >> http://lists.ofbiz.org/mailman/listinfo/dev >> > > > > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev > _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
Hello David,
Sorry for the delayed answer. I had to do some tests
before answering this message.
While testing I
wasn't doing anything special, just browsing products and categories.
Here's the
test configuration:
The product items
that were tested had, besides US-prices, these price settings:
And here're
the results in different browser
conigurations:
Swedish MSIE[sv] - US$ 123,45 (note the space
and the comma as the decimal separator)
English Firefox[en_US] -
$123.45
English Firefox[en_GB] - US$123.45 (note, no space
here)
Regards
</Firas>
-----Original Message----- From: David E. Jones [[hidden email]] Sent: den 22 oktober 2005 18:45 To: OFBiz Project Development Discussion Subject: Re: [OFBiz] Dev - Locale-sensitive functionality - thoughts andquestions I still haven't seen anything that appears to be a stale cache effect, but on the FreeMarker issue... We don't want something that automatically selects the currency based on locale. We have data structures that consist of pairs of fields including currency amounts and currency UOM IDs so what we need is to be able to specify both the amount and the currency used each time one of these values is displayed. That is why we have the ofbiz currency transform. Chances are if something is not displaying a price correctly then it is not getting the currency UOM correctly, or perhaps it is using the ?string.currency built-in instead of the ofbiz currency transform. We eliminated all uses of ?string.currency a while back, but it is possible some have crept back in. So, to trace this down, where are you seeing this effect? What you describe is what would happen if the ?string.currency built-in was used (ie the wrong currency is displayed). What Jacopo described is totally different and is what should happen with the ofbiz currency transform (ie the proper currency is display, it is just formatted differently for the locale). -David On Oct 22, 2005, at 4:58 AM, Firas A. wrote: > Hi, > > I think FreeMarker guys have foreseen a scenario where one would want > an output in a locale other than Session's, like this: > > <#setting locale="${yourLocaleStr}"> > ${price.listPrice} > > Any ideas on cache clearing? > > </Firas> > > -----Original Message----- > From: Jacopo Cappellato [[hidden email]] > Sent: den 21 oktober 2005 12:39 > To: OFBiz Project Development Discussion > Subject: Re: [OFBiz] Dev - Locale-sensitive functionality - > thoughtsand questions > > Yes, > > I too have recently noticed something similar: switching from Italian > to English language and the $ symbol was rendered as US$ The > Freemarker's ?string.currency built-in is not an option because it > doesn't consider the currency of the data bau the currency of the > session. > > Jacopo > > > Firas A. wrote: > >> Hello everyone, >> >> The other day I tested the Locale-sensitive functionality of the >> ecommerce app. For that, I picked a couple of items from the catalog >> to which I added additional prices in Swedish krona (SEK) and >> switched locale from English to Swedish. >> >> There seem to be a cache issue which prevents the correct display of >> the locale-sensitive price and currency. For our discussion assume >> that our item costs $100.00 or 700,00 kr (swedish korna). After >> swithcing to the Swedish locale the new price string becomes >> corrupted; for example $100.00 becomes SKr100,00. There 2 errors whit >> this >> > output: > >> >> 1. the Swedish currency symbol is postfix 'kr' and not >> 'SKr'(prefix) >> 2. the decimal separator (',') is OK but the price is numerically >> still in dollars (100 instead of 700). >> >> Obviously this is due to the caching in the Entity Engine (pls see >> this thread >> <http://lists.ofbiz.org/pipermail/dev/2005-August/009003.html>) >> and probably even FreeMarker since <@ofbizCurrency> is a >> TemplateTransformModel. >> >> My question are: >> >> 1. Is there a way of clearing the cache in question >> programmatically? >> 2. Why use <@ofbizCurrency> when FreeMarker's already supports >> locale-sensitive currency formatting through var? >> string.currency >> (one of it's built-ins for numbers)? >> >> Appreciate your time. >> >> </Firas> >> >> >> --------------------------------------------------------------------- >> - >> -- >> >> >> _______________________________________________ >> Dev mailing list >> [hidden email] >> http://lists.ofbiz.org/mailman/listinfo/dev > > > > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev > _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
Hmmm, I'm still not getting it. What exactly is the problem? I can see that there is a difference between them, but it is mainly that for other locales it is showing explicitly that they are US$ to avoid confusion with other currencies that also use the "$" symbol. In other words, what you describe is pretty much how it should operate. For the browser difference you might want to look at the HTML generated (for reliability must be done on server as the client often changes things even in the view source viewing mode). You can narrow this down by testing with the "sv" locale in Firefox instead of just MSIE (even if it isn't an explicit build for that language you can always pass any locale in any browser, well any _good_ browser anyway...) -David On Oct 25, 2005, at 8:02 AM, Firas A. wrote: > Hello David, > Sorry for the delayed answer. I had to do some tests before > answering this message. > > While testing I wasn't doing anything special, just browsing > products and categories. Here's the test configuration: > Clean OFBiz r.6002/Derby > Started OFBiz with -Duser.language=en -Duser.country=US > Both "Default Locale String" and "Default Currency Uom Id" in the > store settings were set to empty > The product items that were tested had, besides US-prices, these > price settings: > Type - Default > Purpose - Purchase/Initial > Currency: Swedish kronor [SEK] > And here're the results in different browser conigurations: > Swedish MSIE[sv] - US$ 123,45 (note the space and the comma as the > decimal separator) > English Firefox[en_US] - $123.45 > English Firefox[en_GB] - US$123.45 (note, no space here) > > Regards > > </Firas> > > > -----Original Message----- > From: David E. Jones [mailto:[hidden email]] > Sent: den 22 oktober 2005 18:45 > To: OFBiz Project Development Discussion > Subject: Re: [OFBiz] Dev - Locale-sensitive functionality - > thoughts andquestions > > > I still haven't seen anything that appears to be a stale cache > effect, but on the FreeMarker issue... > > We don't want something that automatically selects the currency > based on locale. We have data structures that consist of pairs of > fields including currency amounts and currency UOM IDs so what we > need is to be able to specify both the amount and the currency used > each time one of these values is displayed. That is why we have the > ofbiz currency transform. > > Chances are if something is not displaying a price correctly then > it is not getting the currency UOM correctly, or perhaps it is > using the ?string.currency built-in instead of the ofbiz currency > transform. We eliminated all uses of ?string.currency a while back, > but it is possible some have crept back in. > > So, to trace this down, where are you seeing this effect? What you > describe is what would happen if the ?string.currency built-in was > used (ie the wrong currency is displayed). What Jacopo described is > totally different and is what should happen with the ofbiz currency > transform (ie the proper currency is display, it is just formatted > differently for the locale). > > -David > > > On Oct 22, 2005, at 4:58 AM, Firas A. wrote: > > > Hi, > > > > I think FreeMarker guys have foreseen a scenario where one would > want > > an output in a locale other than Session's, like this: > > > > <#setting locale="${yourLocaleStr}"> > > ${price.listPrice} > > > > Any ideas on cache clearing? > > > > </Firas> > > > > -----Original Message----- > > From: Jacopo Cappellato [mailto:[hidden email]] > > Sent: den 21 oktober 2005 12:39 > > To: OFBiz Project Development Discussion > > Subject: Re: [OFBiz] Dev - Locale-sensitive functionality - > > thoughtsand questions > > > > Yes, > > > > I too have recently noticed something similar: switching from > Italian > > to English language and the $ symbol was rendered as US$ The > > Freemarker's ?string.currency built-in is not an option because it > > doesn't consider the currency of the data bau the currency of the > > session. > > > > Jacopo > > > > > > Firas A. wrote: > > > >> Hello everyone, > >> > >> The other day I tested the Locale-sensitive functionality of the > >> ecommerce app. For that, I picked a couple of items from the > catalog > >> to which I added additional prices in Swedish krona (SEK) and > >> switched locale from English to Swedish. > >> > >> There seem to be a cache issue which prevents the correct > display of > >> the locale-sensitive price and currency. For our discussion assume > >> that our item costs $100.00 or 700,00 kr (swedish korna). After > >> swithcing to the Swedish locale the new price string becomes > >> corrupted; for example $100.00 becomes SKr100,00. There 2 errors > whit > >> this > >> > > output: > > > >> > >> 1. the Swedish currency symbol is postfix 'kr' and not > >> 'SKr'(prefix) > >> 2. the decimal separator (',') is OK but the price is > numerically > >> still in dollars (100 instead of 700). > >> > >> Obviously this is due to the caching in the Entity Engine (pls see > >> this thread > >> <http://lists.ofbiz.org/pipermail/dev/2005-August/009003.html>) > >> and probably even FreeMarker since <@ofbizCurrency> is a > >> TemplateTransformModel. > >> > >> My question are: > >> > >> 1. Is there a way of clearing the cache in question > >> programmatically? > >> 2. Why use <@ofbizCurrency> when FreeMarker's already supports > >> locale-sensitive currency formatting through var? > >> string.currency > >> (one of it's built-ins for numbers)? > >> > >> Appreciate your time. > >> > >> </Firas> > >> > >> > >> > --------------------------------------------------------------------- > >> - > >> -- > >> > >> > >> _______________________________________________ > >> Dev mailing list > >> [hidden email] > >> http://lists.ofbiz.org/mailman/listinfo/dev > >> > > > > > > > > > > _______________________________________________ > > Dev mailing list > > [hidden email] > > http://lists.ofbiz.org/mailman/listinfo/dev > > > > > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
In reply to this post by Firas A.-2
David,
There are two problems with the current functionality of the @ofbizCurrency transform: 1) The formatting for currency symbols other than USD is wrong. In our example, the correct Swedish currency formatting should look like: 1 234,56 kr Note the postfix 'kr'. @ofbizCurrency returns US$ 1 234,56, i.e. prefix 'US$'. 2) The transform displayes wrong prices numerically. For example if an item is priced at 1234 USD and 5678 SEK it allways displays 1234 and not the expected 5678. The above points are observed when switching to another locale by CommonEvents.setSessionLocale or when using any browser with locale setting other than en_US. My expectation from @ofbizCurrency transform was functionality similar to that in java.text.NumberFormat.format() or formatCurrency tag from Jakarta i18n Tag library. Am I too exacting ;-)? Anyway, when it comes to correct currency formatting I can allways switch to another formatting technique. But what should I do to display 'numerically'-correct prices in other currencies? Thanks for your time! </Firas> P.S.I forgot to mention in my previous letters that, while testing, I cleared the cache in WebTools and use this setting in my cache.properties: entitycache.entity-list.default.ProductPriceRule.expireTime=3000 ________________________________ Date: Tue, 25 Oct 2005 09:12:42 -0600 From: "David E. Jones" <[hidden email]> Hmmm, I'm still not getting it. What exactly is the problem? I can see that there is a difference between them, but it is mainly that for other locales it is showing explicitly that they are US$ to avoid confusion with other currencies that also use the "$" symbol. In other words, what you describe is pretty much how it should operate. For the browser difference you might want to look at the HTML generated (for reliability must be done on server as the client often changes things even in the view source viewing mode). You can narrow this down by testing with the "sv" locale in Firefox instead of just MSIE (even if it isn't an explicit build for that language you can always pass any locale in any browser, well any _good_ browser anyway...) -David On Oct 25, 2005, at 8:02 AM, Firas A. wrote: > Hello David, > Sorry for the delayed answer. I had to do some tests before answering > this message. > > While testing I wasn't doing anything special, just browsing products > and categories. Here's the test configuration: > Clean OFBiz r.6002/Derby > Started OFBiz with -Duser.language=en -Duser.country=US Both "Default > Locale String" and "Default Currency Uom Id" in the store settings > were set to empty The product items that were tested had, besides > US-prices, these price settings: > Type - Default > Purpose - Purchase/Initial > Currency: Swedish kronor [SEK] > And here're the results in different browser conigurations: > Swedish MSIE[sv] - US$ 123,45 (note the space and the comma as the > decimal separator) English Firefox[en_US] - $123.45 English > Firefox[en_GB] - US$123.45 (note, no space here) > > Regards > > </Firas> _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
Firas, If it is showing US$ instead of "kr" then there must be an @ofbizCurrency tag somewhere that is not passing in the currency UOM ID. Where is it that you are seeing this, and are you sure the currency in the database is kr/SEK and not USD? -David On Oct 26, 2005, at 3:24 AM, Firas A. wrote: > David, > > There are two problems with the current functionality of the > @ofbizCurrency > transform: > > 1) The formatting for currency symbols other than USD is wrong. > In our > example, the correct Swedish currency formatting should look like: > 1 234,56 > kr > Note the postfix 'kr'. @ofbizCurrency returns US$ 1 234,56, i.e. > prefix > 'US$'. > > 2) The transform displayes wrong prices numerically. For example > if an > item is priced at 1234 USD and 5678 SEK it allways displays 1234 > and not the > expected 5678. > > The above points are observed when switching to another locale by > CommonEvents.setSessionLocale or when using any browser with locale > setting > other than en_US. > > My expectation from @ofbizCurrency transform was functionality > similar to > that in java.text.NumberFormat.format() or formatCurrency tag from > Jakarta > i18n Tag library. Am I too exacting ;-)? > > Anyway, when it comes to correct currency formatting I can allways > switch to > another formatting technique. But what should I do to display > 'numerically'-correct prices in other currencies? > > Thanks for your time! > > </Firas> > > P.S.I forgot to mention in my previous letters that, while testing, I > cleared the cache in WebTools and use this setting in my > cache.properties: > entitycache.entity-list.default.ProductPriceRule.expireTime=3000 > ________________________________ > > Date: Tue, 25 Oct 2005 09:12:42 -0600 > From: "David E. Jones" <[hidden email]> > > Hmmm, I'm still not getting it. What exactly is the problem? I can > see that > there is a difference between them, but it is mainly that for other > locales > it is showing explicitly that they are US$ to avoid confusion with > other > currencies that also use the "$" symbol. In other words, what you > describe > is pretty much how it should operate. > > For the browser difference you might want to look at the HTML > generated (for > reliability must be done on server as the client often changes > things even > in the view source viewing mode). You can narrow this down by > testing with > the "sv" locale in Firefox instead of just MSIE (even if it isn't an > explicit build for that language you can always pass any locale in any > browser, well any _good_ browser > anyway...) > > -David > > > On Oct 25, 2005, at 8:02 AM, Firas A. wrote: > > >> Hello David, >> Sorry for the delayed answer. I had to do some tests before answering >> this message. >> >> While testing I wasn't doing anything special, just browsing products >> and categories. Here's the test configuration: >> Clean OFBiz r.6002/Derby >> Started OFBiz with -Duser.language=en -Duser.country=US Both "Default >> Locale String" and "Default Currency Uom Id" in the store settings >> were set to empty The product items that were tested had, besides >> US-prices, these price settings: >> Type - Default >> Purpose - Purchase/Initial >> Currency: Swedish kronor [SEK] >> And here're the results in different browser conigurations: >> Swedish MSIE[sv] - US$ 123,45 (note the space and the comma as the >> decimal separator) English Firefox[en_US] - $123.45 English >> Firefox[en_GB] - US$123.45 (note, no space here) >> >> Regards >> >> </Firas> >> > > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev > _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev smime.p7s (3K) Download Attachment |
In reply to this post by Firas A.-2
Hi Firas,
Currently Ofbiz doesn't handle currency conversion according to the user's locale "on the fly". That's why currency is displayed in USD and not SEK in your example. Peter Le mercredi 26 octobre 2005 à 11:24 +0200, Firas A. a écrit : > David, > > There are two problems with the current functionality of the @ofbizCurrency > transform: > > 1) The formatting for currency symbols other than USD is wrong. In our > example, the correct Swedish currency formatting should look like: 1 234,56 > kr > Note the postfix 'kr'. @ofbizCurrency returns US$ 1 234,56, i.e. prefix > 'US$'. > > 2) The transform displayes wrong prices numerically. For example if an > item is priced at 1234 USD and 5678 SEK it allways displays 1234 and not the > expected 5678. > > The above points are observed when switching to another locale by > CommonEvents.setSessionLocale or when using any browser with locale setting > other than en_US. > > My expectation from @ofbizCurrency transform was functionality similar to > that in java.text.NumberFormat.format() or formatCurrency tag from Jakarta > i18n Tag library. Am I too exacting ;-)? > > Anyway, when it comes to correct currency formatting I can allways switch to > another formatting technique. But what should I do to display > 'numerically'-correct prices in other currencies? > > Thanks for your time! > _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
In reply to this post by Firas A.-2
Firas,
the multi-currency support in OFBiz is implemented in the following way: - sales orders: the currency is set in the product store (if you want to sell in more than one currency you have to set up more than one store) - purchase orders: the currency cen be set during order entry or in the agreement between the company and the supplier. Hope this helps you. Jacopo Firas A. wrote: > Hello everyone, > > The other day I tested the Locale-sensitive functionality of the > ecommerce app. For that, I picked a couple of items from the catalog to > which I added additional prices in Swedish krona (SEK) and switched > locale from English to Swedish. > > There seem to be a cache issue which prevents the correct display of the > locale-sensitive price and currency. For our discussion assume that our > item costs $100.00 or 700,00 kr (swedish korna). After swithcing to the > Swedish locale the new price string becomes corrupted; for example > $100.00 becomes SKr100,00. There 2 errors whit this output: > > 1. the Swedish currency symbol is postfix 'kr' and not 'SKr'(prefix) > 2. the decimal separator (',') is OK but the price is numerically > still in dollars (100 instead of 700). > > Obviously this is due to the caching in the Entity Engine (pls see this > thread <http://lists.ofbiz.org/pipermail/dev/2005-August/009003.html>) > and probably even FreeMarker since <@ofbizCurrency> is a > TemplateTransformModel. > > My question are: > > 1. Is there a way of clearing the cache in question programmatically? > 2. Why use <@ofbizCurrency> when FreeMarker's already supports > locale-sensitive currency formatting through var?string.currency > (one of it's built-ins for numbers)? > > Appreciate your time. > > </Firas> > > > ------------------------------------------------------------------------ > > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
Free forum by Nabble | Edit this page |