3

i have tried change the currency position of my website cangurumoda.com.br/lojacangu/

it looks like: 200,00 R$

the corrency symbol should looks before the price, like this: R$ 200,00

well, have followed some tutorials, like:

http://php.quicoto.com/how-to-change-currency-position-in-magento/ http://www.everyuseful.com/programming/106-how-to-change-currency-symbol-position-in-magento

pls, need some help with that issue.

thanks!

2 Answers2

5

Which language do you have set up on your store? It should be that file. The symbol below represents your currency symbol, change it's location.

¤

Then open your FTP tool or SSH and delete all contents in the var/cache/ folder. Then it should work. If you have English set up on your store, edit the en.xml file. (I tried this on a demo store I use, and doing this works)

Follow every single step here: http://www.everyuseful.com/programming/106-how-to-change-currency-symbol-position-in-magento and you will succeed:

  1. [In your Magento root, navigate to] /lib/Zend/Locale/Data

  2. Download your language file (us.xml) for example

  3. Open the xml file in any text or xml editor

  4. search for <currencyFormat>

  5. In the following line there is [a <pattern> element], change it from:

    <pattern>¤#,##0.00;(¤#,##0.00)</pattern>
    

    to

    <pattern>#,##0.00 ¤;(#,##0.00 ¤)</pattern>
    

    [i.e. move the currency symbol]

  6. Save the local file, and upload it again to server, overwriting the old one.
Fabian Schmengler
  • 65,791
  • 25
  • 187
  • 421
JJ15
  • 845
  • 9
  • 20
0

go to ( lib/Zend/Currency.php ) move to line 196

if ($options['position'] !== self::STANDARD) {
        $value = str_replace('¤', '', $value);
        $space = '';
        if (iconv_strpos($value, ' ') !== false) {
            $value = str_replace(' ', '', $value);
            $space = ' ';
        }

        if ($options['position'] == self::LEFT) {
            $value = '¤' . $space . $value;//here the currency before the value (price)
        } else {
            $value = $value . $space . '¤';
        }
    }

TO MAKE THE CURRENCY AFTER THE VALUE (PRICE) :

if ($options['position'] !== self::STANDARD) {
        $value = str_replace('¤', '', $value);
        $space = ' ';//make space between the value and the currency
        if (iconv_strpos($value, ' ') !== false) {
            $value = str_replace(' ', '', $value);
            $space = ' ';
        }

        if ($options['position'] == self::LEFT) {
            $value = $value . $space . '¤' ;//print the currency after the value
        } else {
            $value = $value . $space . '¤';
        }
    }