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

Logic of the filtering "and" is not working properly

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.

Hi,

Your products is great, i allready use it for a few years. But i dont know whats happening right now. In my product filter i use checkboxes. So customers can search the products with their criteria. But in the options you have this: AND or OR: if you select AND and select 2 terms on the front of the site, you will find products that match both searches.

If i choose AND, it is working to good? When i select 2 terms it is not showing products with both criteria, it shows all the products which contains the terms.

So what do i do wrong?

Thank you in advance for any help.

With kind regards,

Martijn

Hello Martijn

If you choose AND - the filter should show products that have two terms at the same time.  An example: Filter  logic - Get products that have color red AND  black

OR  logic - Get products that have color red OR  black

if it doesn't work for you - please  drop  me  exact  link to  the  issue

Thanks for your reply Pablo.

So for example: if a product (lets call it product 1) have two terms like the color red and black. In my mind then the product filter should only show product 1. (because thats the only product that match with my selection) When i choose red OR black i will see all the products with that color.

You know what i mean?

You can see it on my webshop: https://www.expertinwijn.nl/wijnen/?swoof=1&product_cat=rode-wijn (its a dutch webshop). This is the link to the page"Red wine". So when you select for example"rode wijn" (means red wine) and"Duitsland" (means Germany), you can see it shows all the red wine, not only the german ones but also from other country's. What i want and what i thought what filter logic will do, is that when i choose red wine and germany that i only see the red wines from germany.

Thanks again!

 

I found this:

add_filter('woof_main_query_tax_relations', 'my_woof_main_query_tax_relations');
function my_woof_main_query_tax_relations()
{
    return array(
   'product_cat' => 'AND',
   'product_tag' => 'AND',
   'pa_color' => 'AND'
    );
}
But when i place it in my function.php of my theme it is still not working.

I solved it, i dont know how to explain it but has something to do with shortcodes.

Hello

oK!  Great!