Currency display issues with Magento

Lately, we have been implementing an open-source ecommerce system, Magento, for a client. Magento seems quite nice, and fully featured, and the code seems well organised, and easily extensible. The main issue at the moment is the shortcomings in documentation. This post is largely a copy of one on the Magento Wiki, and added here only because that page strangely disappeared once.

Indian users of Magento might have encountered what seems to be a strange display problem, where Indian currency is displayed as “Rp” rather than “Rs” with Firefox on Microsoft Windows (IE7 on the same platform shows a box).This happens because Magento (through Zend) uses the Unicode codepoint, U20A8, for the INR currency symbol, rather than the string “Rs”. This is actually correct behaviour, but Microsoft Windows fonts apparently lack coverage for this codepoint unlike in Linux. Hence, the wrong display with Firefox on Windows (I am not sure why it falls back to Rp, and this seems to be a bug in Firefox’s fallback mechanism). This issue is not unique to INR, and similar problems will probably crop up for other currency symbols in the Unicode range U20A0-U20CF.

A possible solution is to edit lib/Zend/Locale/Data/en.xml (assuming one is using an English variant as a locale, e.g., en_US or en_UK. For users of a French variant locale, one would similary edit lib/Zend/Locale/Data/fr.xml), find the entry for “<symbol>U20A8</symbol>”, and within it replace “U20A8” (here, U20A8 is the actual Unicode character, and might show up differently depending on your editor and operating system), and replace it with “<symbol>Rs</symbol>”. Do not forget to refresh the cache. A better method would be to override this setting with a local modification within Magento to lib/Zend/Locale/Data/en.xml, but I am new to Magento and am not sure how to do this.

Advertisement

One Response to “Currency display issues with Magento”

  1. GK Says:

    Hi,
    This is a strange problem that I have encountered too. Have you managed to find something to resolve this?
    Cheers,
    GK

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.