Hello,
It looks like you are using Smart Product Quantity. Please contact us at WooCommerce.com > My Account > Support. You may need to create an account before you can access that page.
Hi @basvweb
We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, you were able to find a solution to your problem! If you have other questions, please feel free to open a new topic.
@maykato
This is what the support of the plugin told me:
Hi, You have to tell us the issues about our plugin we are responsible for. We can override the quantity on cart and checkout pages because we have access there but not for mini cart.
So this is WooCommerce problem..
Hi again @basvweb! I’ve had another look at your website, and noticed that when you add something to the cart, the cart quantity changes from the expected amount (using a decimal) to a rounded number after a few seconds. This typically indicates a conflict of some kind.
The best way to determine this is to:
- Temporarily switch your theme to Storefront
- Disable all plugins except for WooCommerce
- Repeat the action that is causing the problem
This is best done on a staging site. That’s a copy of your live site, so you can test things out without making changes to your actual site. Some hosting companies offer a staging site service within their hosting plans. If yours does not, there is a great free plugin that will allow you to build a complete staging site with a few button clicks: https://wordpress.org/plugins/wp-staging.
If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.`
Hi @imazed ,
Thank you, I’ve noticed this also but what I want is the cart to show the amount of different products in the basket and not the amount of quantity. There must be a code for this I think..
Hey @basvweb,
If I understand correctly you want to show the number 1 in the cart icon instead of 3, although you have 3.8 quantity in the cart, right?

Link to image: https://i.imgur.com/Wk7eZBD.png
To count the number of distinct items in the Cart, no matter their respective cart quantities, you may want to use a code snippet:
https://www.businessbloomer.com/woocommerce-how-to-alter-cart-items-count/
As a side note, I would recommend using a plugin like Code Snippets to add custom PHP code into your site without directly accessing the functions.php file. Here is a link on how to use the Code Snippets plugin:
https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/
Hope this helps!
Thank you so much @rainfallnixfig , the code is working great!!
-
This reply was modified 4 years, 4 months ago by
basvweb.
Glad to hear it – thanks for letting us know!
If you have further questions, feel free to create a new thread.