Zen Cart Logo
Forums / Basic Configuration / Rubles... Font Awesome is the answer, but database change necessary

Rubles... Font Awesome is the answer, but database change necessary

Views: 1,687

Results 1 to 7 of 7
15 Nov 2015, 9:19 PM
#1
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Rubles... Font Awesome is the answer, but database change necessary

Not that anyone's ever going to read this (I notice exactly ZERO results when searching for the Russian Ruble), but just in case it helps someone...

OK, so you noticed that PayPal let's you accept the Ruble and you want to join in the fun. You add a currency and fill in the details... but what about the symbol? So you hop on Wikipedia like I did and promptly realize that there is no html code for the Ruble that is universally adopted. (well, if you're lucky you noticed that). I have a pretty up to date system (Win 10, latest chrome) and their official sympol shows up as nothing more than a square, which isn't correct.

Anyway, long story short... you need to have Font Awesome available to your site (it is a CSS library that lets you easily add common symbols) and then you can insert the symbol using this code:```
<i class="fa fa-rub"></i>


That's fine and dandy, until you save it and it chops off the last ">".  Why?  Because the database currencies table has a limit of 24 characters for symbols :yuck:

So you'll have to open up PHPMyAdmin or whatever you use and adjust the table so that it can accept longer values (we only need 25 but really should be no harm in upping it to a more common 32).  You can also run this SQL command from your admin:```
ALTER TABLE  `currencies` CHANGE  `symbol_left`  `symbol_left` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ;
ALTER TABLE  `currencies` CHANGE  `symbol_right`  `symbol_right` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ;
15 Nov 2015, 9:27 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Rubles... Font Awesome is the answer, but database change necessary

Did you try using: & # 8 3 8 1; without the spaces?

15 Nov 2015, 10:28 PM
#3
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: Rubles... Font Awesome is the answer, but database change necessary

Well, that's how I discovered the "problem". I was looking up that code when I found a stackexchange discussion regarding its non-universal adoption. My browser displays the symbol they were discussing as a square. However, the one you just provided does work in my browser.

And now that I look, I can actually directly copy and paste the symbol directly... but not into ZC admin (square again).

I admit I don't understand how all this works entirely. Would your code be universal?

edit: apparently not... here it is as a square ₽

15 Nov 2015, 11:17 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Rubles... Font Awesome is the answer, but database change necessary

When I add that, without spaces, to a currency I get the P with the slash through it ...

16 Nov 2015, 5:20 AM
#5
lruskauff avatar

lruskauff

Totally Zenned

Join Date:
Sep 2008
Location:
WA
Posts:
559
Plugin Contributions:
0

Re: Rubles... Font Awesome is the answer, but database change necessary

s_mack:

Well, that's how I discovered the "problem". I was looking up that code when I found a stackexchange discussion regarding its non-universal adoption. My browser displays the symbol they were discussing as a square. However, the one you just provided does work in my browser.

And now that I look, I can actually directly copy and paste the symbol directly... but not into ZC admin (square again).

I admit I don't understand how all this works entirely. Would your code be universal?

edit: apparently not... here it is as a square ₽
I see a modified p, not a square. Browser dependant?

16 Nov 2015, 5:43 AM
#6
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Rubles... Font Awesome is the answer, but database change necessary

Ensure Zen Cart is configured (language files and the database) to use a Unicode character set (UTF8 preferred - UTF16 if necessary for the language). If you are using a custom font on the website, make sure the font supports the Unicode character for the Russian Ruble Sign.

16 Nov 2015, 5:51 AM
#7
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: Rubles... Font Awesome is the answer, but database change necessary

lruskauff:

I see a modified p, not a square. Browser dependant?

OK, that's just weird. I see it as a square in my post, but a modified p in your quote of my post! How the hell is that possible? Lol.

Anyway, yes I think it is browser dependant. i don't know why it doesn't work on mine. I'm using Windows 10 with latest Chrome... I keep everything up to date and I don't have any weird settings. So if it isn't dependable enough to show on mine, I have to think it isn't wise to use. Font Awesome type fonts are safe for all but the oldest browsers (IE 7 and older)

As an aside... I think the font awesome version looks better, especially in bold.