Jump to content

How to change currency symbol (SOLVED)


youo_1

Recommended Posts

PrestaShop update 1.7.6 changed CLDR component responsible of displaying data, and now i need to change currency symbol as it's not correct?

https://devdocs.prestashop.com/1.7/modules/core_updates/1.7.6/

1. Can i find help what code should be to customize local currency symbol, and

2. Is it located at /src/Core/Localization/Exception/LocalizationException.php or another location 

Thanks

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

On 7/17/2019 at 3:36 PM, youo_1 said:

PrestaShop update 1.7.6 changed CLDR component responsible of displaying data, and now i need to change currency symbol as it's not correct?

https://devdocs.prestashop.com/1.7/modules/core_updates/1.7.6/

1. Can i find help what code should be to customize local currency symbol, and

2. Is it located at /src/Core/Localization/Exception/LocalizationException.php or another location 

Thanks

Hello:

Here is the toturial for the new PrestaShop 1.7.6 version: https://www.rolige.com/en/blog/change-the-currency-symbol-and-position-in-prestashop-176-n9

  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...

Hi,
I know that topic marked as solved, but unfortunately, I try to use your instructions with no luck.
My store is on three languages (Ua, Ru, En).
/localization/CLDR/core/common/main/ I Found all the files you were talking about.
But when I open my local file uk_Ua.xml I found just this code:

<ldml>
    <identity>
        <version number="$Revision: 13133 $"/>
        <language type="uk"/>
        <territory type="UA"/>
    </identity>
</ldml>
 

When I open ua.xml I can find the currency symbol code:

<currency type="UAH">
                <displayName>украинская гривна</displayName>
                <displayName count="one">украинская гривна</displayName>
                <displayName count="few">украинские гривны</displayName>
                <displayName count="many">украинских гривен</displayName>
                <displayName count="other">украинской гривны</displayName>
                <symbol>грн</symbol>
                <symbol alt="narrow" draft="contributed">грн</symbol>
                <symbol alt="variant">грн.</symbol>

I change the symbol line and symbol alt from "₴" to "грн." (local known currency symbol) to all my languages.

But nothing happening, it still shows the ISO symbol "₴"

What I'm doing wrong?

Link to comment
Share on other sites

30 minutes ago, Bulik said:

Hi,
I know that topic marked as solved, but unfortunately, I try to use your instructions with no luck.
My store is on three languages (Ua, Ru, En).
/localization/CLDR/core/common/main/ I Found all the files you were talking about.
But when I open my local file uk_Ua.xml I found just this code:

<ldml>
    <identity>
        <version number="$Revision: 13133 $"/>
        <language type="uk"/>
        <territory type="UA"/>
    </identity>
</ldml>
 

When I open ua.xml I can find the currency symbol code:

<currency type="UAH">
                <displayName>украинская гривна</displayName>
                <displayName count="one">украинская гривна</displayName>
                <displayName count="few">украинские гривны</displayName>
                <displayName count="many">украинских гривен</displayName>
                <displayName count="other">украинской гривны</displayName>
                <symbol>грн</symbol>
                <symbol alt="narrow" draft="contributed">грн</symbol>
                <symbol alt="variant">грн.</symbol>

I change the symbol line and symbol alt from "₴" to "грн." (local known currency symbol) to all my languages.

But nothing happening, it still shows the ISO symbol "₴"

What I'm doing wrong?

Hi Bulik,

First of all i'm no a developer, i just telling you steps i did  "In my case i modify E£ to EGP"

1. open  /localization/CLDR/core/common/main/ URL and chose language you need to modify

at this folder open en.xml this file include all codes symbols and formatting update your symbols. save it and copy all code to en_US.xml and replace the short code.

Now go to you prestashop back-office and chose international> country >united state and switch Download pack data to NO so it can get your code then import.

you can use same method for all your countries 

clear the cache and it should works now

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 6 months later...

With 1.7, you just have to:
Check which language you are using and alter the respective XML in localization/CLDR/core/common/main/ folder

Here, change the placement of ¤-symbol. I here changed it from the end to front.

                        <currencyFormatLength>
                                <currencyFormat type="standard">
                                        <pattern>¤#,##0.00</pattern>
                                </currencyFormat>
                                <currencyFormat type="accounting">
                                        <pattern>¤#,##0.00</pattern>
                                </currencyFormat>
                        </currencyFormatLength>

I was puzzled first because I was trying to change the es_cl file (Chile - Spanish), but then I realized that my language seemed to be spanish-spanish even though my country was configure to be Chile
(In Europe mostly, the symbol is placed after the amount)

Any way, this worked for me.

Link to comment
Share on other sites

  • 2 weeks later...

Hi folks,

I'm dealing with the same issue (PS 1.7.6.3) and despite trying every solution I've found on these forums, I have not managed to change the currency symbol for my site's default currency (Romanian lei) when the site is viewed in English and German. Prestashop is using odd built-in defaults that make no sense for these languages ("lei" in English and "L" in German) and I'd like to change both to "RON". I tried the solution offered by youo_1 above as such:

<currency type="RON">
  <displayName>Rumänischer Leu</displayName>
  <displayName count="one">Rumänischer Leu</displayName>
  <displayName count="other">Rumänische Leu</displayName>
  <symbol>RON</symbol>
  <symbol alt="narrow" draft="contributed">RON</symbol> <!--changed from "L"-->
</currency>


I changed relevant section of de.xml (above) and also copied it into de_DE.xml, then re-installed German localization (using local data, not downloading from server) with "currencies" checked. Likewise with en.xml and en_GB.xml.  Reset cache, no change. 

Can anyone help?

Link to comment
Share on other sites

  • 1 month later...
On 9/27/2019 at 2:45 PM, youo_1 said:

Hi Bulik,

First of all i'm no a developer, i just telling you steps i did  "In my case i modify E£ to EGP"

1. open  /localization/CLDR/core/common/main/ URL and chose language you need to modify

at this folder open en.xml this file include all codes symbols and formatting update your symbols. save it and copy all code to en_US.xml and replace the short code.

Now go to you prestashop back-office and chose international> country >united state and switch Download pack data to NO so it can get your code then import.

you can use same method for all your countries 

clear the cache and it should works now

thank you. it works

Link to comment
Share on other sites

On 9/27/2019 at 2:45 PM, youo_1 said:

Hi Bulik,

First of all i'm no a developer, i just telling you steps i did  "In my case i modify E£ to EGP"

1. open  /localization/CLDR/core/common/main/ URL and chose language you need to modify

at this folder open en.xml this file include all codes symbols and formatting update your symbols. save it and copy all code to en_US.xml and replace the short code.

Now go to you prestashop back-office and chose international> country >united state and switch Download pack data to NO so it can get your code then import.

you can use same method for all your countries 

clear the cache and it should works now

thank you. it works

Link to comment
Share on other sites

  • 2 months later...
  • 3 weeks later...
On 7/22/2019 at 4:58 PM, Rolige said:

Hello:

Here is the toturial for the new PrestaShop 1.7.6 version: https://www.rolige.com/en/blog/change-the-currency-symbol-and-position-in-prestashop-176-n9

Your tutorial only shows how to change the position - not how to change the actual symbol.
One cannot just change the ¤ symbol, as this will just show this value for ALL other available currencies within this language.
Furthermore the majority of languages do not contain the mentioned code in this file, but in another one (example: da.xml / da_DK.xml), so guess this content needs to be copy/pasted.

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

  • 2 weeks later...
On 9/17/2020 at 6:40 PM, mktm20111 said:

to change the symbol, I actually find an easy solution to this problem in prestashop 1.7.6.7.

Simply go to ps_currency_language in the database and change it there

 

image.png.57f2638c41316ac51b060cb696d23ae5.png

Hi mktm20111, . please could you provide the path where to find this database?

Rgds,

Jose

Link to comment
Share on other sites

17 minutes ago, Jose said:

Hi mktm20111, . please could you provide the path where to find this database?

Rgds,

Jose

there is no path to it, just go to your database (phpmyadmin) I use Cpanel.
If you have Cpanel like me then just click on phpmyadmin
then when you are in your database just click on the database that you create for your site and keep going down until you find the table ps_currency_lang


image.thumb.png.804815edb90a4fa327be735f6b01853c.png

image.png

Link to comment
Share on other sites

16 hours ago, mktm20111 said:

there is no path to it, just go to your database (phpmyadmin) I use Cpanel.
If you have Cpanel like me then just click on phpmyadmin
then when you are in your database just click on the database that you create for your site and keep going down until you find the table ps_currency_lang


image.thumb.png.804815edb90a4fa327be735f6b01853c.png

image.png

Hi mktm20111, you are so nice to share with us in detail and step by step the process. 

Thank you so much! It was easy and it works!

Rgds,

Jose

Link to comment
Share on other sites

  • 4 months later...
On 9/17/2020 at 4:40 PM, mktm20111 said:

to change the symbol, I actually find an easy solution to this problem in prestashop 1.7.6.7.

Simply go to ps_currency_language in the database and change it there

 

image.png.57f2638c41316ac51b060cb696d23ae5.png

This absolutely worked for me. You sir are a life saver. Thank you very much! 

Link to comment
Share on other sites

  • 2 months later...

The easiest way... It is on the admin function....  Took me a while to see it but it is there...  I use version 1.7.7.3

Admin = > International => Localisation => Currencies (top bar) then go down to Currency edit => Edit symbol / format....  Voila!

:)

You can go to www.treasure-pro.com  and on the main page you can see that the sign is HK$ instead of $

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...