Unable to round cents to 0.99, 0.50 or 0.95 when switching currencies
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from tarot emporium on July 11, 2021, 06:35Hello!
I tried adding the following code to the functions.php file in Theme but no changes when I switch currencies. Ideally I want the price to end with $0.95/£0.95 etc, but tried testing it with the below code and it didn't work anyway.
23 add_filter('woocs_raw_woocommerce_price', function($price) {return round($price + 0.01) – 0.01;});I appreciate your help on this! I'm using Themify theme if that helps or not.
Cheers!
Hello!
I tried adding the following code to the functions.php file in Theme but no changes when I switch currencies. Ideally I want the price to end with $0.95/£0.95 etc, but tried testing it with the below code and it didn't work anyway.
2 3 | add_filter('woocs_raw_woocommerce_price', function($price) { return round($price + 0.01) – 0.01; }); |
I appreciate your help on this! I'm using Themify theme if that helps or not.
Cheers!
Quote from Pablo Borysenco on July 12, 2021, 11:27Hello
In which file(name) did you insert this code
Please drop me exact link to the issue
Hello
In which file(name) did you insert this code
Please drop me exact link to the issue
Quote from tarot emporium on July 12, 2021, 12:00Hi Pablo,
I copied and pasted the above code into this:
(https://tarotemporium.com.au/supportcurrency/) <-temporary image
Hi Pablo,
I copied and pasted the above code into this:
(https://tarotemporium.com.au/supportcurrency/) <-temporary image
Quote from tarot emporium on July 13, 2021, 08:39Hi Pablo,
Do you have any suggestions? I understand support tickets are not reviewed over weekends but I've been having issue with this for 4 days now. I'm really looking for a currency switcher/converter for my e-commerce site and definitely want this to work and upgrade to the paid version to include more currencies.
I just can't get this to work, I looked at all support pages and copy & paste the code into the functions.php, to see no changes. I want all currencies (GBP, AUD, CAD, USD, Euro) to end with .95 eventually but even testing with the below doesn't work.add_filter('woocs_raw_woocommerce_price', function($price) {return round($price + 0.01) – 0.01;});Thank you!
Hi Pablo,
Do you have any suggestions? I understand support tickets are not reviewed over weekends but I've been having issue with this for 4 days now. I'm really looking for a currency switcher/converter for my e-commerce site and definitely want this to work and upgrade to the paid version to include more currencies.
I just can't get this to work, I looked at all support pages and copy & paste the code into the functions.php, to see no changes. I want all currencies (GBP, AUD, CAD, USD, Euro) to end with .95 eventually but even testing with the below doesn't work.
Thank you!
Quote from Pablo Borysenco on July 13, 2021, 12:01Hello
Add this code to functions.php:
add_filter('woocs_raw_woocommerce_price', function($price){
return round($price-0.01) - 0.05;
});
add_filter('woocs_woocommerce_variation_prices', function($price){
return round($price-0.01) - 0.05;
});Please drop me exact link to the issue(the page with products)
Hello
Add this code to functions.php:
add_filter('woocs_raw_woocommerce_price', function($price){
return round($price-0.01) - 0.05;
});
add_filter('woocs_woocommerce_variation_prices', function($price){
return round($price-0.01) - 0.05;
});
Please drop me exact link to the issue(the page with products)
Quote from tarot emporium on July 13, 2021, 12:17Thanks Paulo, I think it worked by defaulting products to $XX.95. However, when I switched from AUD to USD, back to AUD, it doesn't change back into AUD or flat, the amount doesn't change.
(https://tarotemporium.com.au/shop/bags/test-product/)
Thanks Paulo, I think it worked by defaulting products to $XX.95. However, when I switched from AUD to USD, back to AUD, it doesn't change back into AUD or flat, the amount doesn't change.
Quote from tarot emporium on July 13, 2021, 12:18After you change currencies, it doesn't update the flat/currency.
After you change currencies, it doesn't update the flat/currency.
Quote from tarot emporium on July 13, 2021, 12:19Testing on mobile (iOs - Safari) is where I am experiencing the most issues. For some reason it's defaulting in USD (not AUD where I am located), it doesn't change to AUD when I select, and the flags/currency doesn't update.
[EDIT] I purged all the cache, re-open the site and it's defaulting at AUD. I change the currency to USD, the price changes but not the flag, still showing in AUD. However, when you change back to AUD, the price doesn't change and is stuck at USD amount.
https://tarotemporium.com.au/shop/bags/test-product/
Testing on mobile (iOs - Safari) is where I am experiencing the most issues. For some reason it's defaulting in USD (not AUD where I am located), it doesn't change to AUD when I select, and the flags/currency doesn't update.
[EDIT] I purged all the cache, re-open the site and it's defaulting at AUD. I change the currency to USD, the price changes but not the flag, still showing in AUD. However, when you change back to AUD, the price doesn't change and is stuck at USD amount.
Quote from Pablo Borysenco on July 14, 2021, 10:44Hello
Please check options - https://share.pluginus.net/image/i20210714114446.png
Hello
Please check options - https://share.pluginus.net/image/i20210714114446.png
Quote from tarot emporium on July 14, 2021, 10:48Hi Pablo, I went into my settings and changed everything to the options you provided. When I switch to say USD, the currency changes but still says AUD at the top. Please advise.
Hi Pablo, I went into my settings and changed everything to the options you provided. When I switch to say USD, the currency changes but still says AUD at the top. Please advise.
Quote from tarot emporium on July 14, 2021, 10:49I also tested on Chrome after I purged the cache and nothing happens (no change of currency or flag, stays on AUD).
I also tested on Chrome after I purged the cache and nothing happens (no change of currency or flag, stays on AUD).
Quote from Pablo Borysenco on July 14, 2021, 11:43My test - https://c2n.me/4cGLCKd
And please use correct currency codes(https://share.pluginus.net/image/i20210714124324.png) - USD and AUD without $
My test - https://c2n.me/4cGLCKd
And please use correct currency codes(https://share.pluginus.net/image/i20210714124324.png) - USD and AUD without $
Quote from tarot emporium on August 16, 2021, 10:51Hi Pablo,
I have now upgraded to the Pro version and unable to see Euro update when I change currencies (shows as $0.00).
https://tarotemporium.com.au/shop/bags/test-product/And in terms of Japanese Yen, are you able to provide a code where the cents will round to .00 and all the other currencies end 0.95?
Hi Pablo,
I have now upgraded to the Pro version and unable to see Euro update when I change currencies (shows as $0.00).
https://tarotemporium.com.au/shop/bags/test-product/
And in terms of Japanese Yen, are you able to provide a code where the cents will round to .00 and all the other currencies end 0.95?
Quote from tarot emporium on August 16, 2021, 10:53Apologies, looks like Euro has updated on it's own.
However, still have issue with JPY.
Apologies, looks like Euro has updated on it's own.
However, still have issue with JPY.
Quote from Pablo Borysenco on August 16, 2021, 12:10Hello
Please check the rate. It shouldn't be zero
Hello
Please check the rate. It shouldn't be zero
Quote from tarot emporium on August 16, 2021, 12:18Hi Pablo, thank you.
Now when I select any currency, it doesn't update.
And in terms of Japanese Yen, are you able to provide a code where the cents will round to .00 and all the other currencies end 0.95?
Hi Pablo, thank you.
Now when I select any currency, it doesn't update.
And in terms of Japanese Yen, are you able to provide a code where the cents will round to .00 and all the other currencies end 0.95?
Quote from Pablo Borysenco on August 17, 2021, 11:34Hello
Now when I select any currency, it doesn't update. - My test - https://c2n.me/4d213lc
Japanese Yen - This currency has no cents. For other currencies, you use the rounding code. Send me this code
Hello
Now when I select any currency, it doesn't update. - My test - https://c2n.me/4d213lc
Japanese Yen - This currency has no cents. For other currencies, you use the rounding code. Send me this code
Quote from tarot emporium on August 18, 2021, 01:27Hi Pablo, thank you!
Japanese Yen is now showing on my website.
I have another question.. on physical products I want the price to be XX.95 (to which it's showing).
However, on virtual products/services I would like the price to be $60.00.
Is there a way to split products this way?
Hi Pablo, thank you!
Japanese Yen is now showing on my website.
I have another question.. on physical products I want the price to be XX.95 (to which it's showing).
However, on virtual products/services I would like the price to be $60.00.
Is there a way to split products this way?
Quote from Pablo Borysenco on August 18, 2021, 11:22Hello
Unfortunately no. Because there is no way to get product information inside these hooks
Hello
Unfortunately no. Because there is no way to get product information inside these hooks
Quote from tarot emporium on August 19, 2021, 06:35Hi Pablo,
Looking at the code, is there not a way to add product category or something to that degree? I'm not a programmer but something like:
add_filter('woocs_raw_woocommerce_price',
function
wpb_catlist_desc(subscription),
function($price){
return round($price-0.01) - 0.05;
});
add_filter('woocs_woocommerce_variation_prices',function
wpb_catlist_desc(subscription),
function($price){
return round($price-0.01) - 0.05;
});My programming knowledge is really lacking but using the above as an example.
Hi Pablo,
Looking at the code, is there not a way to add product category or something to that degree? I'm not a programmer but something like:
add_filter('woocs_raw_woocommerce_price',function
wpb_catlist_desc(subscription),
function($price){
return round($price-0.01) - 0.05;
});
add_filter('woocs_woocommerce_variation_prices', function
wpb_catlist_desc(subscription),
function($price){
return round($price-0.01) - 0.05;
});
My programming knowledge is really lacking but using the above as an example.