Jump to content

How change ISO code currency BYR to BYN


AlexSF

Recommended Posts

Good day!

 

In the summer of 2016 a denomination occurred in Belarus. As a result, the ISO codes of the "Belarusian ruble"

With BYR / 974 to BYN / 933.

 

How to add the currency "Belarusian ruble (BYN)" with ISO code 933 to PrestaShop?

Or change the existing now, but officially obsolete, values of BYR / 974?

 

 

Using PrestaShop 1.7.1.0

Link to comment
Share on other sites

Yes, Yes. I can, only not any currency, but only by selecting from the drop-down list.
But "BYN" in this list is not present.
So I did this:
1) \translations\cldr\main--ru-RU--currencies
,"BYB":{"displayName":"\u0411\u0435\u043b\u043e\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u0440\u0443\u0431\u043b\u044c (1994\u20131999)","symbol":"BYB"},"BYR":{"displayName":"\u0411\u0435\u043b\u043e\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u0440\u0443\u0431\u043b\u044c","displayName-count-one":"\u0431\u0435\u043b\u043e\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u0440\u0443\u0431\u043b\u044c","displayName-count-few":"\u0431\u0435\u043b\u043e\u0440\u0443\u0441\u0441\u043a\u0438\u0445 \u0440\u0443\u0431\u043b\u044f","displayName-count-many":"\u0431\u0435\u043b\u043e\u0440\u0443\u0441\u0441\u043a\u0438\u0445 \u0440\u0443\u0431\u043b\u0435\u0439","displayName-count-other":"\u0431\u0435\u043b\u043e\u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u0440\u0443\u0431\u043b\u044f","symbol":"BYR","symbol-alt-narrow":"\u0440."},"BYN":{"displayName":"\u0411\u0435\u043b\u043e\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u0440\u0443\u0431\u043b\u044c (BYN)","displayName-count-one":"\u0431\u0435\u043b\u043e\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u0440\u0443\u0431\u043b\u044c","displayName-count-few":"\u0431\u0435\u043b\u043e\u0440\u0443\u0441\u0441\u043a\u0438\u0445 \u0440\u0443\u0431\u043b\u044f","displayName-count-many":"\u0431\u0435\u043b\u043e\u0440\u0443\u0441\u0441\u043a\u0438\u0445 \u0440\u0443\u0431\u043b\u0435\u0439","displayName-count-other":"\u0431\u0435\u043b\u043e\u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u0440\u0443\u0431\u043b\u044f","symbol":"BYN","symbol-alt-narrow":"\u0440."},

2) \translations\cldr\supplemental--currencyData

,"BYR":{"_rounding":"0","_digits":"0"},"BYN":{"_rounding":"0","_digits":"0"}, 

and

,{"BYB":{"_to":"2000-12-31","_from":"1994-08-01"[spam-filter],{"BYR":{"_to":"2016-07-01","_from":"2000-01-01"[spam-filter],{"BYN":{"_from":"2016-07-01"[spam-filter]],

3) \translations\cldr\supplemental--codeMappings

,"BYR":{"_numeric":"974"},"BYN":{"_numeric":"933"},

4) \translations\cldr\datas\supplemental\currencyData.json

"BY": [
          {
            "SUR": {
              "_to": "19[spam-filter]12-25",
              "_from": "1961-01-01"
            }
          },
          {
            "RUR": {
              "_to": "1994-11-08",
              "_from": "19[spam-filter]12-25"
            }
          },
          {
            "BYB": {
              "_to": "2000-12-31",
              "_from": "1994-08-01"
            }
          },
          {
            "BYR": {
              "_to": "2016-07-01",
			  "_from": "2000-01-01"
            }
          },
		  {
            "BYN": {
              "_from": "2016-07-01"
            }
          }
        ],

5) \localization\by.xml

<currencies>
    <currency name="Belarusian ruble" iso_code="BYN" iso_code_num="933" sign="р." blank="0" conversion_rate="1.000000" format="2" decimals="0"/>
</currencies>

I hope that the actions I performed will be enough for correct work PrestaShop. And I did not miss the files.

Also, I hope that these changes will be made in all localizations PrestaShop.

Edited by AlexSF (see edit history)
Link to comment
Share on other sites

  • 2 years later...
On 4/30/2019 at 6:25 AM, Дмитрий Фёдоров said:

Good afternoon. Sharing my decision. Working files in the application: BYR_in_BYN.zip

There is no way to record a video. Be sure to save the original files before replacing these, test the store (currency selection function in the front office), if all is well, leave. If you have any questions, write.

 

great work, thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...