Skip to Content
author's profile photo Former Member
Former Member

Different currency formats for same currency in different countries

Hello Experts ,

We have a very basic situation to have different price formats for same currency (EURO) in different countries(Germany , France , Italy etc.) .

I am pretty much acquainted with DecimalFormat API of java which is been exercised in DefaultPriceDataFactory.java class too OOB that takes all necessary inputs from CurrencyModel instance to facilitate country specific formatted price value.

As part of solution to above problem , I created country specific euro currency instances (EUR_FR , EUR_IT etc) to facilitate currency having country specific standard/non-standard formatted value (a specific pattern ) and introduced a new attribute on Currency type 'iso4217' to exhibit corresponding ISO 4217 code. In this way currency instances with EUR_FR , EUR_IT will have same ."EUR" iso4217 attribute value.

I had also to introduce this new attribute to facilitate having EUR_FR , EUR_IT corresponded with external systems where EURO is the recognised currency . Everything is all sorted with very minimal changes in terms of supplying appropriate instances to other areas of application where Currency is much needed like BaseStore , Promotions , Taxes etc.

For the above solution , I am being questioned to "duplicate" EURO currency . is that so ? was introducing Currency an item type not the real purpose of catering such cases in the first place ?

Thanks in advance for your replies !

Regards, Virendra

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Sep 21, 2018 at 03:03 PM

    Hi!

    I wouldn't have introduced additional currencies, but added some kind of format map (Country -> Numberformat) to the existing Currency item type that would allow to configure different formats per country, plus the necessary customization of DefaultPriceDataFactory to fetch the correct format from the map.

    But you are right, it's strange that this use case isn't fully supported OOTB.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.