Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #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,

    #170466

    Hey yukanl!

    Please refer to WooCommerce documentation http://docs.woothemes.com/document/add-a-custom-currency-symbol/

    Regards,
    Yigit

    #170536

    Thank 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.

    #170560

    Hello!

    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,
    Yigit

    EDIT: You can copy HTML code of Chinese Yuan symbol here http://en.wikipedia.org/wiki/%C2%A5

    • This reply was modified 11 years, 1 month ago by Yigit.
    #170600

    Hi 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,

    #170603

    For 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.

    #170795

    Hi!

    Can you post the link to your website where you have Chinese Yuan symbol?

    Best regards,
    Yigit

    #170854
    This reply has been marked as private.
    #170988

    Hello!

    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,
    Ismael

    #171045

    Hi 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.

    #171477

    Hey!

    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!
    Ismael

    #171581

    Ismael,

    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,

    #171667

    Hey!

    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,
    Yigit

    #171797

    Yigit,

    What changes do I need to undo and redo in the functions.php file?

    Thanks,

    #171821

    Hey!

    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 helps

    Best regards,
    Yigit

    #172879

    Hi 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,

    #172974

    Hello!

    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 Yuan

    Best regards,
    Yigit

    #172976

    Yigit,

    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,

    #172980

    Hey!

    You are welcome :) Closed

    Best regards,
    Yigit

Viewing 19 posts - 1 through 19 (of 19 total)
  • The topic ‘incorrect currency symbol displayed’ is closed to new replies.