How to change currency name in Magento?

Instead of displaying "British Pound - GBP" in the currency selector, I would like it to simply show "GBP - £" or "USD - $" etc. Anyone got an idea on how to do this in magento? Thanks!

+4
source share
3 answers

Open app/design/frontend/YOUR-PACKAGE/YOUR-THEME/template/directory/currency.phtml

You will see the following code that will be displayed: Currency Name - Currency Code

(e.g. British Pound Sterling - GBP )

 <?php echo $_name ?> - <?php echo $_code ?> 

Your requirement should display: Currency Code - Currency Symbol

(e.g. GBP - £ )

So you can do the following:

 <?php echo Mage::app()->getLocale()->currency( $_code )->getSymbol() ?> - <?php echo $_code ?> 
+1
source

The ET_CurrencyManager extension will not help with this selector.

To change this part, you need to change template currency.phtml This template is in the base theme here

  /app/design/frontend/base/default/template/directory/currency.phtml 

but you need to copy this file to your theme or find this template in your theme

  /app/design/frontend/default/YOUR THEME/template/directory/currency.phtml 

And then change the code

  <?php echo $_name ?> - <?php echo $_code ?> 

to

  <?php echo $_code ?> - <?php echo Mage::app()->getLocale()->currency($_code)->getSymbol() ?> 
0
source

Here you can do rough coding: P

modify the following file in your magento installation.

/ application / design / interface / default / OWN THEME / template / directory / currency.phtml

 switch($_code){ case 'GBP': $symbol = '£'; break; default: $symbol = '$'; } //change the following line <?php echo $_name ?> - <?php echo $_code ?> 

to

 <?php echo $_code ?> - <?php echo $symbol ?> 
0
source

Source: https://habr.com/ru/post/1447581/


All Articles