PHPackages                             ecommpro/module-custom-currency - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ecommpro/module-custom-currency

ActiveMagento2-module

ecommpro/module-custom-currency
===============================

Custom Currency for Magento 2

1.1.6(3y ago)194.1k8[2 PRs](https://github.com/ecommpro/custom-currency/pulls)MITPHP

Since Jan 24Pushed 3y ago3 watchersCompare

[ Source](https://github.com/ecommpro/custom-currency)[ Packagist](https://packagist.org/packages/ecommpro/module-custom-currency)[ RSS](/packages/ecommpro-module-custom-currency/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (14)Used By (0)

Custom Currency for Magento 2
=============================

[](#custom-currency-for-magento-2)

- No critical rewrites.
- Add as many currencies as you want.
- Customize default currencies like USD or EUR.
- Customize precision (decimal places).
- Preloaded with the general purpose currency *Point* and some of top cryptocurencies like *Bitcoin (BTC)* or *Ethereum (ETH)*.

Installation
------------

[](#installation)

```
composer require ecommpro/module-custom-currency

```

Execute the following commands

```
php bin/magento module:enable EcommPro_CustomCurrency
php bin/magento setup:upgrade

```

Access the Magento 2 administration panel and configure the module.

User Guide
----------

[](#user-guide)

### Description

[](#description)

EcommPro Custom Currency allows you to create and edit new currencies directly from the Magento administrator. Manage the options of these currencies such as the precision of decimals, the symbol as image, emoji or text, position, etc. Advisable for cryptocurrency.

Regarding **currencies**, **Magento 2** has a lack.

The currency system is heavily dependent on the PHP intl [ICU](http://site.icu-project.org/) extension.

This is not bad. The intl extension is battle tested and powerful.

But it covers only official fiat currencies.

What about using custom currencies like *points*? Or what about the increasingly popular **crypto currencies** like Bitcoin (BTC), Tron (TRX), Ripple (XRP), among others?

At the moment there’s no a solution provided from the **Magento 2** core.

We’ve created a module to manage **custom currencies**, preloaded with some useful data like *points* currency and some of the most popular cryptos.

We’ve decided to publish it in GitHub as open source.

[](https://github.com/ecommpro/custom-currency)

We hope it is useful for you.

### What can I do with EcommPro Custom Currency?

[](#what-can-i-do-with-ecommpro-custom-currency)

- Create as many coins as you need.
- Enables, disables or eliminates coins.
- Give them a code, a name in the singular and in the plural.
- Set the precision in decimals, ideal for cryptocurrency.
- Set the symbol position (before or after the price).
- Manage the currency symbol as text, emoji or image.

### Module Guide

[](#module-guide)

You can access the module options easily from the side menu, `Stores > Currency > EcommPro Custom Currency`.

You can list and manage new currencies easily from a Magento Grid.

[![Image 2](https://camo.githubusercontent.com/096598a144ccc1e7dc229da95f0902bfed350f8fc5669d73ffb5370e7f8867bf/68747470733a2f2f65636f6d6d2e70726f2f77702d636f6e74656e742f75706c6f6164732f323031392f30312f30322e706e67)](https://camo.githubusercontent.com/096598a144ccc1e7dc229da95f0902bfed350f8fc5669d73ffb5370e7f8867bf/68747470733a2f2f65636f6d6d2e70726f2f77702d636f6e74656e742f75706c6f6164732f323031392f30312f30322e706e67)

Customize your new coins with the variety of possible options such as number of decimals, position, name or symbol.

[![Image 3](https://camo.githubusercontent.com/74d1dd7a60aac4f44d4bd527ae577fe1eb6230a76f13aa48f3a92dee950e1ed8/68747470733a2f2f65636f6d6d2e70726f2f77702d636f6e74656e742f75706c6f6164732f323031392f30312f30332e706e67)](https://camo.githubusercontent.com/74d1dd7a60aac4f44d4bd527ae577fe1eb6230a76f13aa48f3a92dee950e1ed8/68747470733a2f2f65636f6d6d2e70726f2f77702d636f6e74656e742f75706c6f6164732f323031392f30312f30332e706e67)

From the Magento coin configuration section, select your new coins.

[![Image 4](https://camo.githubusercontent.com/8f917ac6c9f688c195b8bf4087694475591b58936d238d27da752b0fa2ad63f5/68747470733a2f2f65636f6d6d2e70726f2f77702d636f6e74656e742f75706c6f6164732f323031392f30312f30342e706e67)](https://camo.githubusercontent.com/8f917ac6c9f688c195b8bf4087694475591b58936d238d27da752b0fa2ad63f5/68747470733a2f2f65636f6d6d2e70726f2f77702d636f6e74656e742f75706c6f6164732f323031392f30312f30342e706e67)

Go to a listing or product listing and you will see your new currency in action.

[![Image 5](https://camo.githubusercontent.com/591ff2a9517851c2a4e8c8aa00b4b3495b713c9c8ec2b966651dea6685e40cc4/68747470733a2f2f65636f6d6d2e70726f2f77702d636f6e74656e742f75706c6f6164732f323031392f30312f30352e706e67)](https://camo.githubusercontent.com/591ff2a9517851c2a4e8c8aa00b4b3495b713c9c8ec2b966651dea6685e40cc4/68747470733a2f2f65636f6d6d2e70726f2f77702d636f6e74656e742f75706c6f6164732f323031392f30312f30352e706e67)

You can add your own currencies from the admin page or via dependency injection XML:

### Admin Page

[](#admin-page)

Visit `Stores > Configuration > EcommPro > Custom Currency` and add the currencies you want in the text box, separated by blank lines, with the format:

```
{code}
{singular}
{plural}

```

Example:

```
XMPL
Examplium
Exampliums

DOGE
DogeCoin
DogeCoins

```

### Dependency Injection XML

[](#dependency-injection-xml)

If you want your currencies be available at install time, this should be the chosen method.

Add the currencies as the array of arrays argument of the `EcommPro\CustomCurrency\Model\Config` object constructor:

```

                XMPL
                Examplium
                Exampliums

                DOGE
                DogeCoin
                DogeCoins

```

Internals
---------

[](#internals)

This module is based on these observations:

- Magento class loader doesn't load a class if it was previously loaded.
- Magento doesn't check the type of PHP ResourceBundle returned by `Magento\Framework\Locale\Bundle\CurrencyBundle` and simply uses it as an array, as it implements array access and iteration.
- In magento core files, `Magento\Framework\Locale\Bundle\CurrencyBundle` is always instantiated via constructor with `new`: `(new CurrencyBundle())`

```
grep -hr CurrencyBundle vendor/*
```

```
use Magento\Framework\Locale\Bundle\CurrencyBundle;
            $currencies = (new CurrencyBundle())->get($this->localeResolver->getLocale())['Currencies'];
use Magento\Framework\Locale\Bundle\CurrencyBundle as CurrencyBundle;
                        $allCurrencies = (new CurrencyBundle())->get(
class CurrencyBundle extends DataBundle
use Magento\Framework\Locale\Bundle\CurrencyBundle;
        $currencies = (new CurrencyBundle())->get($this->localeResolver->getLocale())['Currencies'] ?: [];
        $currencyBundle = new \Magento\Framework\Locale\Bundle\CurrencyBundle();
use Magento\Framework\Locale\Bundle\CurrencyBundle;
        $currencies = (new CurrencyBundle())->get(Resolver::DEFAULT_LOCALE)['Currencies'];
```

So, the key idea is to load our own version of `Magento\Framework\Locale\Bundle\CurrencyBundle` (a really simple class), override the `get` method and return a modified array imitating the original `ResourceBundle`.

Help and information
--------------------

[](#help-and-information)

If you need help or a specialized service you can receive support by writing an email from the following form:

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 84.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~111 days

Recently: every ~269 days

Total

13

Last Release

1340d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bfe5db9c5b599de481b56f842a11e196279579c2b280a70b9fc0e908e78e4a00?d=identicon)[EcommPro](/maintainers/EcommPro)

---

Top Contributors

[![manelio](https://avatars.githubusercontent.com/u/2852852?v=4)](https://github.com/manelio "manelio (64 commits)")[![johnorourke](https://avatars.githubusercontent.com/u/2004038?v=4)](https://github.com/johnorourke "johnorourke (6 commits)")[![EdgarGomez](https://avatars.githubusercontent.com/u/4573062?v=4)](https://github.com/EdgarGomez "EdgarGomez (3 commits)")[![noeli-getjohn](https://avatars.githubusercontent.com/u/107501648?v=4)](https://github.com/noeli-getjohn "noeli-getjohn (2 commits)")[![noeli-eshopguru](https://avatars.githubusercontent.com/u/50664110?v=4)](https://github.com/noeli-eshopguru "noeli-eshopguru (1 commits)")

---

Tags

magentomagento2magento2-extensionmagento2-modulephp

### Embed Badge

![Health badge](/badges/ecommpro-module-custom-currency/health.svg)

```
[![Health](https://phpackages.com/badges/ecommpro-module-custom-currency/health.svg)](https://phpackages.com/packages/ecommpro-module-custom-currency)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
