Convert Price into Reward points

To show price as points , You can implement following logic

  • create a custom currency "Reward Points"

  • Allow "Reward Points" custom currency from admin panel currency

  • Set currency set for "Reward Points" 10 = 1 USD

  • set Default Display Currency to "Reward Points"

We accused Custom Currency code for Reward Points is "PTS" (as "INR" for Indian Rupee)

You can follow below steps to implement above logic.

step 1) open YOUR-MAGENTO-ROOT-DIRECTORY/vendor/magento/zendframework1/library/Zend/Locale/Data/en.xml

Under currencies xml entity , enter your custom currency entiry (i.e "Reward Points") as follows and save the xml file.

<currency type="PTS">
   <displayName>Reward Points</displayName>
   <displayName count="one">Reward Points</displayName>
   <displayName count="other">Reward Points</displayName>

step 2: open YOUR-MAGENTO-ROOT-DIRECTORY/vendor/magento/zendframework1/library/Zend/Locale/Data/en.xml

under installed XML entity enter your custom currency code as below


step 3: Create a custom extension or use any exiting custom extension

step 4: we assumed , we are using custom extension Company_MyModule

step 5: craete file AddCurrencies.php under app/code/Company/MyModule/Model/Config

File AddCurrencies.php

namespace Company\MyModule\Model\Config;

use Magento\Framework\Locale\Bundle\CurrencyBundle;

class AddCurrencies extends \Magento\Framework\Locale\TranslatedLists

    public function getNewCurrencies() 
           This is your function that returns an array with new
           currencies. For example: 
        return [
            ['value' => 'PTS', 'label' => 'Reward Points'],            

    public function getOptionAllCurrencies()
        $currencyBundle = new \Magento\Framework\Locale\Bundle\CurrencyBundle();
        $locale = $this->localeResolver->getLocale();
        $currencies = $currencyBundle->get($locale)['Currencies'] ?: [];

        $options = [];
        foreach ($currencies as $code => $data) {
            $options[] = ['label' => $data[1], 'value' => $code];
        $options = array_merge($options, $this->getNewCurrencies());

        return $this->_sortOptionArray($options);

    public function getOptionCurrencies()
        $currencies = (new CurrencyBundle())->get($this->localeResolver->getLocale())['Currencies'] ?: [];
        $options = [];
        $allowed = $this->_config->getAllowedCurrencies();
        foreach ($currencies as $code => $data) {
            if (!in_array($code, $allowed)) {
            $options[] = ['label' => $data[1], 'value' => $code];
        $options = array_merge($options, $this->getNewCurrencies());

        return $this->_sortOptionArray($options);


step 6: Run following CLI command from your Magento 2 root directory to clear static contend and generated files

sudo rm -rf var/view_preprocessed/*
sudo rm -rf var/pub/static/*
sudo rm -rf var/cache/*
sudo rm -rf var/generated

step 7: Again run following CLI command from your Magento 2 root directory

sudo php bin/magento setup:upgrade
sudo php bin/magento setup:di:compile
sudo chmod -Rv 777 pub var generated

step 8: Please go to admin panel and navigate Stores->Configuration-> Currency Setup (under general tab) Select "Reward Points" and "US Dollar" as Allowed Currencies. now click "Save Config" button.

Step 9: Please go to Admin panel Stores-> Currency Rates Now enter Currency rate for "PTS" (i.e Reward Points) as 10.00 = 1 USD click "Save Currency Rates"

Step 10: Refresh Cache from System-> Cache Management

step 11: To display Price in Points, Please go to admin panel and navigate Stores->Configuration-> Currency Setup (under general tab) set Default Display Currency = Reward Points click "Save Config"

step 12: Please refresh cache again to show price in Points

Allowed Currency setting

Price With USD

enter image description here