PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Product count not working well when 'NOT IN' filter logic is applied

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 please
If 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.
12

I applied 'NOT IN' filter logic to a block but in the product count appears the products that belong to this taxonomy.

Example: https://intoleranycias.com/productos/?filtro=1&q=/productos/&rev_product_ing=altramuces

Hello

Please describe it in more detail

 in the product count appears the products that belong to this taxonomy. - which counter shows the wrong value?

Please add wp-admin access - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134615.png

Hello, yes, I have two products with the custom taxonomy 'altramuces'. When I apply the 'not in' filter logic, this custom taxonomy should not appear because there are no products without this taxonomy, however it appears that there are 2.

And also the taxonomies without products should appear in the filter showing all products.

Hello

Unfortunately, this access does not allow me to check the settings (go to the admin panel)

Sorry, now

Hello

I did   a test - https://share.pluginus.net/image/i20240410124923.png - Looks like it's working correctly now

It's not working well... Product count says there are 7 when there are more than 7...

Please drop me ftp access - https://share.pluginus.net/image/i20230222134241.png ->https://share.pluginus.net/image/i20230222134615.png

done!

Hello

For this taxonomy, the counter shows how many products will be excluded

But I added this code  - https://share.pluginus.net/image/i20240411104611.png - especially for you  in  file - wp-content\plugins\woocommerce-products-filter\index.php

please do a test

 

I saw it, thank you very much Pablo. I found a problem and it is that the dynamic count is not working.

 

My  test - https://c2n.me/4kFQDr5 - dynamic recalculation seems to be working

Please describe your problem in more detail

Hello Pablo, it's not working when you apply a filter from the 'Alérgenos' block.

https://snipboard.io/3yCKsk.jpg

If you mean inside one taxonomy. Yes, regardless of the comparison log within one taxonomy there is no dynamic recalculation. But in your case, this does not work correctly because the counter does not show the number of attributes in a product, but the total number of products without an attribute.

Changing this behavior requires deeper research

 

 

Could you fix this in the next update?

Hello

This will not be included in the next version because it is not a fix. This is customization

The standard operation of the counter is to display how much this attribute will hide

Hello Pablo, I finally decided to remove the product count for this block but it's not working well. I have this filters applied https://intoleranycias.com/productos/?filtro=1&q=/productos/&product_tag=eco&rev_product_ing=fructosa and when i apply the filter 'ALTRAMUCES' https://intoleranycias.com/productos/?filtro=1&q=/productos/&product_tag=eco&rev_product_ing=fructosa,altramuces it doesn't show any product because all products have the product meta 'ALTRAMUCES'.  But if there is no product, it shouldn't show it, right?

Hello

In this case, the filter will show attributes that will not affect the result in any way. In fact, attributes with a zero counter will be displayed

 

But in this case https://intoleranycias.com/productos/?filtro=1&q=/productos/&product_tag=eco&rev_product_ing=fructosa 'ALTRAMUCES' shouldn't appear in the filter because there are no products without 'ALTRAMUCES' attribute, no?

12