-
AuthorPosts
-
March 2, 2015 at 8:32 pm #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 HereMarch 3, 2015 at 1:22 pm #405097Hi gearouthere!
USD should not be displayed. What kind of changes have you made on your website regarding WooCommerce?
Best regards,
YigitMarch 4, 2015 at 7:41 pm #406009Hi 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 hereMarch 4, 2015 at 7:49 pm #406014Hi!
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,
YigitMarch 4, 2015 at 8:12 pm #406021Hi 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.
March 4, 2015 at 8:35 pm #406029Hi!
Please try adding following code to Quick CSS
.cart .amount:before { content: 'USD'; }
Regards,
YigitMarch 4, 2015 at 10:41 pm #406114Hello 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 HereMarch 5, 2015 at 4:40 pm #406497Hi!
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,
YigitMarch 6, 2015 at 9:16 pm #407272Hi 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 HereMarch 9, 2015 at 1:27 am #407798Hi!
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,
IsmaelMarch 9, 2015 at 7:01 pm #408361Thanks 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.
March 10, 2015 at 9:12 am #408673Hi!
It works fine on our installation. Make sure that you copy the correct code. Get the code here: http://pastebin.com/TWUh09Wn
Regards,
IsmaelMarch 12, 2015 at 6:47 pm #410645Hi Ismael, thank you so much, worked pefectly!!
Thanks,
Gear Out Here -
AuthorPosts
- The topic ‘Remove currency off woocommerce’ is closed to new replies.