Showing results for 
Search instead for 
Did you mean: 

Adding Custom Currency

Adding Custom Currency

Hello everyone,

I want to add a new currency to my magento store and I searched for hours on google but I got no solution for my problem.


That's what i did so far:

- In vendor/magento/zendframework1/library/Zend/Locale/Data/en.xml I added this in the <currencies> section:


<currency type="ZZZ">
    <displayName>Custom Currency</displayName>
    <displayName count="one">Custom Currency</displayName>
    <displayName count="other">Custom Currency</displayName>

- In vendor/magento/module-directory/etc/config.xml I added ZZZ to the <currency><installed> section string (the very long comma seperated one).


- In vendor/magento/framework/Locale/Config.php I added to the $_allowedCurrencies array:

'ZZZ', /*Custom Currency*/

- In vendor/magento/zendframework1/library/Zend/Locale/Data/root.xml I added:

<currency type="ZZZ">
    <symbol alt="narrow">CC</symbol>

- In vendor/magento/zendframework1/library/Zend/Locale/Data/supplementalData.xml I added:

<region iso3166="150"><!-- Europe -->
    <currency iso4217="EUR" from="1999-01-01"/>
    <currency iso4217="ZZZ" from="2011-04-01"/>

 (Shop is only available for european countries)

- And in the same file I added to the <fractions> section:

<info iso4217="ZZZ" digits="2" rounding="0"/>

I refreshed and flushed all caches and the cache container several times and deleted all files in var/cache manually but the new currency will not appear in the "Allowed Currencies" or the other drop downs.


btw: Changing the name of an existing currency will not work too.

So it seams that there is another place where magento stores those values but I can't figure this out.


Can somebody help me to figure out what is missing to get this thing right? I think I'm very close to solve this problem but the final part is missing.




Re: Adding Custom Currency

What exactly currency are trying to add?

Re: Adding Custom Currency

As described I want to add a brand new custom currency.

I want to create my own virtual currency with a self written API to deal with transactions and stuff.

So I want to add this virtual currency to my shop so the users can see how much something will cost in this particular currency.

The name of the currency is not neccessary as I think and it's still in development.


Assume the name of the currency would be "Custom Currency", the short code is "ZZZ" and the symbol is "CC".


If you need more information, just let me know.

Re: Adding Custom Currency

I figured out, that the currencies magento 2 uses are deep in the intl module of php in binary format.


So after 2 weeks of research and frustrating moments I've decided to switch over to woocommerce.

There you get a simple snippet right from the developers in installation process and a new currency is build up in seconds.


Sorry Magento, I wanted to use this software because it's very complex and so I don't have to develop that much on my own.

But without custom currencies I can't use it for my purpose.



Re: Adding Custom Currency

I also need to create a custom or virtual currency. If someone has a solution, please let me know.