nilsuria
Forum Replies Created
-
Hi Christian,
this is not solving the problem… Any other idea of what may cause the problem or any possible solution?
Best regards,
Nil
Forum: Plugins
In reply to: [WooCommerce] Rounding error in woocommerce shiping after applaying taxHi!
I think I found a solution that works. It’s detailed here: https://annaschneider.me/calculate-shipping-cost-including-tax-woocommerce/
Thanks!
Forum: Plugins
In reply to: [WooCommerce] Rounding error in woocommerce shiping after applaying taxForum: Plugins
In reply to: [WooCommerce] Rounding error in woocommerce shiping after applaying taxHi Con,
I’ve been trying many things, and that’s what I’ve discovered:
1. The original problem is with the shipping price rounding after applying tax. Your script seems to effect only the products, but not the shipping.
2. The rounding of the products is already right without using your script. I’ve set a product with the shipping price (3.4082371422717) and it correctly shows at the front as 4.12 tax included. The problem appears at the checkout: even though the price is calculated correctly, the subtotal is 4.13 (wrong!). It seems to me that the error is here, as I think that the shipping price appears directly as a subtotal.Then, I guess that the subtotal only takes two decimals. If we somehow get to make the subtotal calculation with the real product base price instead of the two decimals rounded one, we are done. What I don’t understand is why this is not a default feature in woocommerce, since it’s the more logical.
Thank you again Con!
Forum: Plugins
In reply to: [WooCommerce] Rounding error in woocommerce shiping after applaying taxHi again,
I have tried this snippet and don’t work. If I increase the number of decimals in the woocommerce settings, all the prices in the store, checkout, invoices… Everywhere the amount is shown with three decimals. That is not good because the costumers as well as the totals in the invoice should be just two decimals. If I keep the decimals to two, I don’t see any effect either. So, this is snippet is not showing any effect for the two installations that I’ve been trying it (one with the default storefront theme).
Nevertheless, If I understand the approach, it’s not a bad Idea. Still, I can’t understand why this don’t have an easier solution. I guess that many may have the same problem that I’m having.
Thank you again for your help, Con.
Forum: Plugins
In reply to: [WooCommerce] Rounding error in woocommerce shiping after applaying taxHi Con!
Then, your Idea in this code is to set the number of decimals to 3 in the Woocomerce settings and then change the display using the woocommerce_get_price_html filter?
It seems good Idea. I’m going to try!
Forum: Plugins
In reply to: [WooCommerce] Rounding error in woocommerce shiping after applaying taxHi,
I have just tried and it keeps doing the same. I think it’s a woocommerce issue because it always round the number to the second decimal. Then, 3,408 -> 3.41 -> 3,41*1.21 = 4.13. Instead of doing the correct math: 3.408*1.21 = 4.12.
This must have an easy solution!
Thanks again for your help Con. Let’s see if we can find the solution…
Forum: Plugins
In reply to: [WooCommerce] Rounding error in woocommerce shiping after applaying taxHi again,
When I say unexpected behaviour I mean the rounding of 3.4082371422717. The rounding of 3,4+3,4*0,21 = 4,114 >> 4,11 is correct ass woocommerce does it. 4,114 rounded is actually 4,11 and not 4,12 as you suggested.
Thanks again!
Forum: Plugins
In reply to: [WooCommerce] Rounding error in woocommerce shiping after applaying taxHi Con, thank you a lot for your effort. This solution is not working. At the checkout page the shipping price shows as 4,11 if i put 3,40… Can’t understand why woocommerce is doing so unexpected behaviour. I don’t think this is a PHP issue as with plain php you can do rounding with many more decimals than two.
Forum: Fixing WordPress
In reply to: Pages appear emptySolved! i was just using the wrong page template! hehe
Thank you!
Forum: Fixing WordPress
In reply to: Pages appear emptyI’ve been trying to find the bug analysing the rendered page with chrome inspector tool, and it’s soo weird. WordPress is rendering the page article with all the parts, except the content. My first thought was that it might be caused for php text widget plugin, but as i said the problem persists after removing it.
May it be some corrupted function? but then why if i update pages that are already created it works fine?
Thank you very much for your help!
Forum: Fixing WordPress
In reply to: Pages appear emptyThe content that should appear is just that “Test test test test test test test! please work!”.
The complete list of active plugins I’m using is this: contact form 7, Homepage Control, MailChimp for WordPress Lite, Reorder Posts, Smart Slider 2, Widget Logic, WooCommerce, WooCommerce Multilingual, WooCommerce PDF Invoices, WooCommerce Table Rate Shipping, WPML Media, WPML Multilingual CMS, WPML String Translation, WPML Translation Management.
I deactivated some plugins like “php text widget”, but the problem persists.
thank you in advance contentiskey!