-
AuthorPosts
-
October 4, 2013 at 10:27 am #170375
Hi,
I found the theme does not display the Chinese yuan symbol (¥) correctly, it’s a “Y” with two strikes, instead, the theme displays the Japanese Yen which is a “Y” with one strike.
The correct Chinese Yuan should be like this, http://en.wikipedia.org/wiki/File:9yuan.jpg
Can you please help fix this?
Thank you,
October 4, 2013 at 3:56 pm #170466Hey yukanl!
Please refer to WooCommerce documentation http://docs.woothemes.com/document/add-a-custom-currency-symbol/
Regards,
YigitOctober 4, 2013 at 6:19 pm #170536Thank you, Yigit. The currency is already supported by WooCommerce. The issue is that whenever I try to add the symbol to a page, note not a woocommerce page, it would be shown as Japanese Yen instead of Chinese Yuan. Please try it yourself and you will know what I mean.
thanks.
October 4, 2013 at 6:45 pm #170560Hello!
I tried and it works on my end http://i.imgur.com/We7GS4k.jpg
I guess you skipped adding currency symbol. Please add following code to the end of Functions.php file`add_filter( 'woocommerce_currencies', 'add_my_currency' ); function add_my_currency( $currencies ) { $currencies['ABC'] = __( 'Chinese Yuan', 'woocommerce' ); return $currencies; } add_filter('woocommerce_currency_symbol', 'add_my_currency_symbol', 10, 2); function add_my_currency_symbol( $currency_symbol, $currency ) { switch( $currency ) { case 'ABC': $currency_symbol = '¥'; break; } return $currency_symbol; }`
Regards,
YigitEDIT: You can copy HTML code of Chinese Yuan symbol here http://en.wikipedia.org/wiki/%C2%A5
- This reply was modified 11 years, 2 months ago by Yigit.
October 4, 2013 at 8:56 pm #170600Hi Yigit,
Thanks for spending time on this issue. Appreciate it.
It is weird. I checked again using Chrome Version 30.0.1599.66 m, IE 10 and FF 24.0 from Win7. All have it shown as Japanese Yen (check screenshot here) even when the code shows I have Chinese Yuan written (check here) .
However, it shows correctly as Yuan from iPad and from a tablet I have that’s running Andoid 4.0. I am pretty sure that the Yuan currency is included in the WooCommerce version I have 2.0.0.14, Yuan is a major currency and I can display products in this currency with no problem.
Any idea what might be causing this?
Thank you,
October 4, 2013 at 9:01 pm #170603For a sec, I was thinking this might be a Win7 issue. However, I have not had any problem with other web sites that use the Chinese Yuan symbol. So this may not be an OS related issue.
October 5, 2013 at 2:28 pm #170795Hi!
Can you post the link to your website where you have Chinese Yuan symbol?
Best regards,
YigitOctober 5, 2013 at 8:57 pm #170854This reply has been marked as private.October 6, 2013 at 4:19 am #170988Hello!
You can refer to this link for the Chinese Yuan symbol: https://github.com/woothemes/woocommerce/issues/1114
You can add the Chinese Yuan html entity code on the Price Row:
¥900
Best regards,
IsmaelOctober 6, 2013 at 5:59 am #171045Hi Ismael,
It is already in the woocommerce-core-functions.php file.
”
case ‘USD’ :
$currency_symbol = ‘$’;
break;
case ‘EUR’ :
$currency_symbol = ‘€’;
break;
case ‘CNY’ :
case ‘RMB’ :
case ‘JPY’ :
$currency_symbol = ‘¥’;
break;”
As I mentioned in the previous posts, the Yuan shows correctly in iPad, Android tablet and from linux machines. but not from win 7 at least. I tried FF, IE and Chrome from win 7, all showed Japanese Yen instead of Chinese Yuan.October 7, 2013 at 7:14 am #171477Hey!
Please remove browser cache then reload the page a few times. I tested this on Chrome and Firefox using Windows 7 64bit. As you can see on the screenshot above, the Chinese Yuan shows up.
Cheers!
IsmaelOctober 7, 2013 at 12:54 pm #171581Ismael,
Cache is not the problem here. I have cleaned it numerous times but it just shows Japanese Yen in Win 7. Another friend also told me the same, linux and ipad are okay but not from his Win 7.
thanks,
October 7, 2013 at 3:56 pm #171667Hey!
I am not sure what is the problem here but can you undo and redo changes in functions.php file? I am also using Win7 and when i check your website on Chrome, Firefox and IE, all shows Chinese Yuan as Japanese Yen. But as in screenshot i posted, it looks fine on my local installation on Chrome,Firefox and IE on Win7.
Regards,
YigitOctober 7, 2013 at 7:45 pm #171797Yigit,
What changes do I need to undo and redo in the functions.php file?
Thanks,
October 7, 2013 at 8:07 pm #171821Hey!
Basically these ones https://kriesi.at/support/topic/incorrect-currency-symbol-displayed/#post-170560
Firstly please remove the code, logout, login, then insert the code once again. But instead of ‘¥’ insert HTML code of Chinese Yuan. You can find it in the wikipedia link i posted. I hope that helpsBest regards,
YigitOctober 9, 2013 at 6:56 am #172879Hi Yigit,
I tried to follow your instructions but it still shows Japanese Yen on the site.
Here is the code that I added,
add_filter( 'woocommerce_currencies', 'add_my_currency' ); function add_my_currency( $currencies ) { $currencies['ABC'] = __( 'Chinese Yuan', 'woocommerce' ); return $currencies; } add_filter('woocommerce_currency_symbol', 'add_my_currency_symbol', 10, 2); function add_my_currency_symbol( $currency_symbol, $currency ) { switch( $currency ) { case 'ABC': $currency_symbol = '¥'; break; } return $currency_symbol; }
BTW, I have no problem to see the “Chinese Yuan” symbol at the site you gave me which is http://en.wikipedia.org/wiki/%C2%A5. I think it’s pretty safe to say that it’s not a browser issue since tested that link in IE, Chrome and FF on Win 7. The exact same os and browsers that show Japanese yen at our site.
One interesting finding though is that when I created a product in Chinese (product title, description etc. in Chinese) but had “Language of this product” marked as “English”, go to “View Product” would give me a page on which the currency symbol of the product is displayed in Chinese Yuan. And that’s the only way to have a Chinese Yuan displayed, on a product page. The pricing table and html text would still display Japanese Yen.
And that’s without adding the custom woocommerce code you provided from above.
Thanks,
October 9, 2013 at 1:03 pm #172974Hello!
Did you insert HTML code of Yuan? http://i.imgur.com/KUNoMUN.jpg
I can safely say that this is not a theme issues because everything works fine on my end no matter where i use Chinese YuanBest regards,
YigitOctober 9, 2013 at 1:12 pm #172976Yigit,
Yes, I used the HTML code but that didn’t help.
Let’s go ahead and close this thread. I will just have to get used to it.
Thanks again to you and everyone who helped me on this issue. Really appreciate it.
Thank you,
October 9, 2013 at 1:18 pm #172980 -
AuthorPosts
- The topic ‘incorrect currency symbol displayed’ is closed to new replies.