wrong cart and checkout calculations
-
Hi there,
I got a calculation issue on a client’s woocommerce e-shop.Here my example to explain you what’s happening.
I put in my cart three objects of 10.80 Euros value, total amount: 32,40 Euros.
Plus, I have shipping cost (9,05€), calculated with a third party plugin (Tree table rate shipping). For a subtotal amount of 41,45 Euro.On this subtotal we have to calculate 22% vat (italian IVA). I set it on WOOCOMMERCE>SETTINGS>TAX>STANDARD RATE, and I set a value of 22% for all the countries.
Here’s the problem. Woocommerce makes a small but very important error.
It calculates 22% in 9,13 but it’s wrong. The right value should be 9,119 > 9,12.It’s just one cent, but still very sirious issue I need to fix.
By the way, all the plugins, theme and wordpress are updated.
I even tried to deactivate all the plugins one by one, just to check if there was an incompatibility with one of them. Nothing changed.Can you please give me support on this problem? or explain what’s going on?
Thank you in advance.
-
Hi @dotdesignag,
I tried to reproduce the issue you described: added to cart three products costing €10.80 each and a tax rate of 22%. I then manually set a shipping rate of €9.05 and the result was a total tax of €9.12.
I suspect that the issue in your case has to do with the value of the shipping cost given by the third-party plugin. To confirm this, we’d want to check the full figures being used in the calculation.
Therefore, kindly increase the number of decimals (to 4 or above) in WooCommerce → Settings → General
After that, take a screenshot of the checkout page with the same three products as you’d described in your example above.I recommend https://snipboard.io for easily sharing screenshots – please follow the instructions on the page, then paste the URL in this chat. It works with Chrome, Firefox, Safari, and Edge.
Thanks.
Hi @abwaita, thanks for your reply.
If I set decimals to 3 or 4 or more, the total changes and goes right.
https://snipboard.io/uPbW71.jpgBut the fact is that if I deactivate the shipping plugin, I have the same problem: calculations goes right with decimals: the problem is still rounding amounts.
Should I try to delete it and erase all the database tables related to the plugin maybe? Or what should I do in your opinion?
The fact is that this plugin allows me to make few interesting tricks I couldn’t do with the basic woocommerce shipping options: i.e. I can make a rule that allow shipping cost to be included in coupons price (coupon 100 – cart 97 – shipping 4 > I pay only 1)
It’s even a paid plugin ??Thanks again
Thanks for back @dotdesignag.
I appreciate the screenshot. At the moment, we’re still finding the cause of the issue, so just keep the shipping plugin as is.
We’d like to take a closer look at your setup, thus could you kindly share a copy of your site’s System Status?
You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response. If you prefer to preserve privacy, you can remove the site’s URL from the information.Thanks.
@abwaita thanks again for your support.
Here the system status:
### WordPress Environment ### WordPress address (URL): https:// Site address (URL): https:// WC Version: 4.8.0 REST API Version: ? 4.8.0 WC Blocks Version: ? 3.8.1 Action Scheduler Version: ? 3.1.6 WC Admin Version: ? 1.7.3 Log Directory Writable: ? WP Version: 5.6 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ? Language: de_DE External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.3.24 PHP Post Max Size: 8 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: 7.71.0 OpenSSL/1.1.1d SUHOSIN Installed: – MySQL Version: 5.6.47-cll-lve Max Upload Size: 2 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 4.8.0 WC Database Prefix: wp_ Total Database Size: 20.79MB Database Data Size: 16.42MB Database Index Size: 4.37MB wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.08MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_db7_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_layerslider: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_layerslider_revisions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 4.05MB + Index: 0.08MB + Engine InnoDB wp_pc_users: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_pc_user_meta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_postmeta: Data: 2.52MB + Index: 2.03MB + Engine InnoDB wp_posts: Data: 1.52MB + Index: 0.20MB + Engine InnoDB wp_redirection_404: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_redirection_items: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_redirection_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_revslider_css: Data: 0.13MB + Index: 0.00MB + Engine InnoDB wp_revslider_css_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_layer_animations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_navigations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_sliders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_sliders_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_slides_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_static_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_static_slides_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 0.13MB + Index: 0.11MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.05MB + Index: 0.09MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfblockediplog: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfblocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfconfig: Data: 1.30MB + Index: 0.00MB + Engine InnoDB wp_wfcrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wffilemods: Data: 3.52MB + Index: 0.00MB + Engine InnoDB wp_wfhits: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfhoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfknownfilelist: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wp_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wflogins: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfnotifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfsnipcache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfstatus: Data: 0.16MB + Index: 0.11MB + Engine InnoDB wp_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpmm_subscribers: Data: 0.00MB + Index: 0.00MB + Engine MyISAM ### Post Type Counts ### attachment: 240 ig_campaign: 1 ig_message: 4 nav_menu_item: 9 page: 19 pg_user_page: 1 popup_theme: 8 post: 1 product: 82 product_variation: 148 revision: 122 shop_coupon: 169 shop_order: 21 wpcf7_contact_form: 1 yith-wcbm-badge: 3 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (21) ### LayerSlider WP: by Kreatura Media – 6.11.2 Bridge Core: by Qode – 2.4.6 Classic Editor: by WordPress Contributors – 1.6 Contact Form 7: by Takayuki Miyoshi – 5.3.1 Contact Form CFDB7: by Arshid – 1.2.5.3 Yoast Duplicate Post: by Enrico Battocchi & Team Yoast – 3.2.6 Cookie and Consent Solution for the GDPR & ePrivacy: by iubenda – 2.3.14 WPBakery Page Builder: by Michael M - WPBakery.com – 6.3.0 Loco Translate: by Tim Whitlock – 2.4.6 LoginPress - Customizing the WordPress Login: by WPBrigade – 1.5.0 Popup Maker: by Popup Maker – 1.13.1 PrivateContent: by Luca Montanari – 7.321 Redirection: by John Godley – 4.9.2 Slider Revolution: by ThemePunch – 6.2.22 WooCommerce Tree Table Rate Shipping: by tablerateshipping.com – 1.26.1 Checkout Field Editor for WooCommerce: by ThemeHigh – 1.4.4 WooCommerce Stripe Gateway: by WooCommerce – 4.6.0 WooCommerce: by Automattic – 4.8.0 Wordfence Security: by Wordfence – 7.4.14 WP Maintenance Mode: by Designmodo – 2.3.0 YITH WooCommerce Badge Management: by YITH – 1.4.7 ### Inactive Plugins (1) ### Country Based Restrictions for WooCommerce: by zorem – 2.8.0 ### Settings ### API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 4 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – ### WC Pages ### Shop base: #40 - /produkte/ Cart: #26 - /warenkorb/ Checkout: #28 - /auschecken/ My account: #38 - /mein-konto/ Terms and conditions: #42 - /verkaufsbedingungen/ ### Theme ### Name: Bridge Version: 23.1 Author URL: https://qodethemes.com/ Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ? ### Templates ### Archive Template: Your theme has a woocommerce.php file you will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues. Overrides: bridge/woocommerce/cart/cart-empty.php bridge/woocommerce/cart/cart-shipping.php bridge/woocommerce/cart/cart-totals.php bridge/woocommerce/cart/cart.php bridge/woocommerce/cart/shipping-calculator.php bridge/woocommerce/checkout/form-coupon.php bridge/woocommerce/checkout/thankyou.php bridge/woocommerce/content-product.php bridge/woocommerce/content-single-product.php bridge/woocommerce/global/form-login.php bridge/woocommerce/global/quantity-input.php bridge/woocommerce/loop/add-to-cart.php bridge/woocommerce/loop/loop-start.php bridge/woocommerce/loop/pagination.php bridge/woocommerce/loop/rating.php bridge/woocommerce/loop/result-count.php bridge/woocommerce/loop/sale-flash.php bridge/woocommerce/myaccount/form-login.php bridge/woocommerce/myaccount/form-lost-password.php bridge/woocommerce/myaccount/my-address.php bridge/woocommerce/myaccount/my-orders.php bridge/woocommerce/single-product/add-to-cart/external.php bridge/woocommerce/single-product/add-to-cart/grouped.php bridge/woocommerce/single-product/add-to-cart/simple.php bridge/woocommerce/single-product/add-to-cart/variable.php bridge/woocommerce/single-product/related.php bridge/woocommerce/single-product/sale-flash.php bridge/woocommerce/single-product/tabs/additional-information.php bridge/woocommerce/single-product/tabs/description.php bridge/woocommerce/single-product/tabs/tabs.php bridge/woocommerce/single-product/up-sells.php ### Action Scheduler ### Complete: 59 Oldest: 2020-12-02 08:40:10 +0000 Newest: 2020-12-16 13:13:56 +0000
Hope we can sort this out! Thank you very much
Hi @dotdesignag ,
Thanks for the SSR.
It seems that there is an open WooCommerce Core issue around tax rounding.
Therefore, I’d like you to submit this as another case for our developers to take a look at. You can add the issue, with the same level of detail as you provided earlier, to the discussion here: https://github.com/woocommerce/woocommerce/issues/24184
Just wrote there.
Thank you again @abwaita.Hope they will fix this issue soon!
Glad that you did so – thanks for letting us know!
I’ll mark this thread as resolved for now in favor of the discussion on GitHub. If you’ll have further questions, you can create a new thread.
Thanks.
- The topic ‘wrong cart and checkout calculations’ is closed to new replies.