
Rutger Martijn(@rutger-martijn)
8 Posts
Customers
Quote from Rutger Martijn on December 28, 2020, 22:25
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
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

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on December 29, 2020, 14:05
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
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

Rutger Martijn(@rutger-martijn)
8 PostsTopic Author
Customers
Quote from Rutger Martijn on December 29, 2020, 17:02
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!
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!

Rutger Martijn(@rutger-martijn)
8 PostsTopic Author
Customers
Quote from Rutger Martijn on December 29, 2020, 23:19
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 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.

Rutger Martijn(@rutger-martijn)
8 PostsTopic Author
Customers
Quote from Rutger Martijn on December 30, 2020, 12:28
I solved it, i dont know how to explain it but has something to do with shortcodes.
I solved it, i dont know how to explain it but has something to do with shortcodes.

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on December 30, 2020, 14:00
Hello
oK! Great!
Hello
oK! Great!