Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #404758

    Hello and thanks for your theme and your constant support! We were wondering if it was possible with our woocommerce store to take off the sign (“usd”) off all pages except for the final checkout page.(but leave the $ sign)?

    Thanks,
    Gear Out Here

    #405097

    Hi gearouthere!

    USD should not be displayed. What kind of changes have you made on your website regarding WooCommerce?

    Best regards,
    Yigit

    #406009

    Hi Yigit,

    you’re right, we actually added code to display USD on all other pages. I removed it. This changes my question slightly, what would we do to add the USD symbol only in the cart, once the product is added?

    Thanks,
    Gear out here

    #406014

    Hi!

    Please try adding following code to Functions.php file in Appearance > Editor

    function avia_remove_wc_currency_symbol( $currency_symbol, $currency ) {
    if (!is_cart()){
         $currency_symbol = '';
         return $currency_symbol;
     }
    }
    add_filter('woocommerce_currency_symbol', 'avia_remove_wc_currency_symbol', 10, 2);

    Regards,
    Yigit

    #406021

    Hi Yigit, thanks, this didn’t do the trick though. I already removed the currency symbols from everywhere, so we don’t really need to remove the $ sign but just need to add “USD” to the cart.

    #406029

    Hi!

    Please try adding following code to Quick CSS

    .cart .amount:before {
    content: 'USD';
    }

    Regards,
    Yigit

    #406114

    Hello Yigit, this worked but now we don’t have the $ symbol on all pages, just the number, we need the $ symbol too….
    Thanks,
    Gear Out Here

    #406497

    Hi!

    Can you please elaborate on the changes you would like to make so we can make sure that we are on the same page?

    Best regards,
    Yigit

    #407272

    Hi Yigit,sory for confusing you,

    so right now on our front page we have both the $ sign and the USD sign. On that page we only want a $ sign, no “USD”. Then on the single product page and in the cart we do want both USD and $ sign… so basically we want to take the USD sign off the home page, category pages etc but have it on the single product page and in the cart… Does this make sense?

    Thanks,
    Gear Out Here

    #407798

    Hi!

    Try this:

    function avia_remove_wc_currency_symbol( $currency_symbol, $currency ) {
    if (is_single()) {
         $currency_symbol = 'USD $';
         return $currency_symbol;
    } else {
    	$currency_symbol = '$';
        return $currency_symbol;
    }
    }
    add_filter('woocommerce_currency_symbol', 'avia_remove_wc_currency_symbol', 10, 2);

    Regards,
    Ismael

    #408361

    Thanks Ismael, hmmm seems to be breaking our website :( gives the following error: “Parse error: syntax error, unexpected ‘/’ in /nfs/c09/h04/mnt/188733/domains/aquaquestonline.com/html/wp-content/themes/enfold/functions.php on line 3740”

    Thanks,

    Gear Out Here

    • This reply was modified 9 years, 9 months ago by gearouthere.
    #408673

    Hi!

    It works fine on our installation. Make sure that you copy the correct code. Get the code here: http://pastebin.com/TWUh09Wn

    Regards,
    Ismael

    #410645

    Hi Ismael, thank you so much, worked pefectly!!

    Thanks,
    Gear Out Here

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Remove currency off woocommerce’ is closed to new replies.