Add custom conditions for the filtered products and terms count
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 pleaseIf 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.
Quote from wpinstinct on April 3, 2023, 15:14PRIVATE DATA!
I am using your plugin based filters in the left sidebar on this page: https://site.com/category/performance/braking-system/brake-pads-and-shoes-performance/
1. What I want, I want to filter out the products using your terms from the left sidebar but at the same time, I want to make dsome modifications in the query for some additional custom conditions. I have used this hook for the purpose: woof_products_query. Is it the correct way to do it or is there any better one available?
2. At the same time, I want to change the count also against each of the term but it doesn't work. I couldn't find any relevant hook for this. Can you please guide me how to do it?
PRIVATE DATA!
I am using your plugin based filters in the left sidebar on this page: https://site.com/category/performance/braking-system/brake-pads-and-shoes-performance/
1. What I want, I want to filter out the products using your terms from the left sidebar but at the same time, I want to make dsome modifications in the query for some additional custom conditions. I have used this hook for the purpose: woof_products_query. Is it the correct way to do it or is there any better one available?
2. At the same time, I want to change the count also against each of the term but it doesn't work. I couldn't find any relevant hook for this. Can you please guide me how to do it?
Quote from wpinstinct on April 3, 2023, 18:04Can you guys please remove the personal info (Puchase Code and Website URL ) from this public thread as I wasn't aware with this?
Can you guys please remove the personal info (Puchase Code and Website URL ) from this public thread as I wasn't aware with this?
Quote from wpinstinct on April 4, 2023, 08:21I tried this one as per your suggestion:
https://products-filter.com/manipulate-search-data-options
But it doesn't work in the same way WordPress does. There is no way to add a tax_query in your query/request parameter. EG:
- Works in your case:
$query['product_cat'] = 'music';- Not works:
$query['tax_query'] = array (
array (
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => array( 'music' )
)
);I need the second solution to work because that's just an example. I need tax_query and few other WordPress query rules to apply.
I tried this one as per your suggestion:
https://products-filter.com/manipulate-search-data-options
But it doesn't work in the same way WordPress does. There is no way to add a tax_query in your query/request parameter. EG:
- Works in your case:
$query['product_cat'] = 'music'; - Not works:
$query['tax_query'] = array (
array (
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => array( 'music' )
)
);
I need the second solution to work because that's just an example. I need tax_query and few other WordPress query rules to apply.
Quote from Pablo Borysenco on April 4, 2023, 11:28Hello
Ok! what I gave you is the ability to make a search query with minimal code.
If it doesn't suit you
For filter counters - woof_dynamic_count_attr - https://share.pluginus.net/image/i20230404102504.png
For products template - It depends on what you use to display products. If standard template then use standard hook - woocommerce_product_query
woof_products_query - this is for shortcode[woof_products] and ajax mode
Hello
Ok! what I gave you is the ability to make a search query with minimal code.
If it doesn't suit you
For filter counters - woof_dynamic_count_attr - https://share.pluginus.net/image/i20230404102504.png
For products template - It depends on what you use to display products. If standard template then use standard hook - woocommerce_product_query
woof_products_query - this is for shortcode[woof_products] and ajax mode
Quote from wpinstinct on April 17, 2023, 08:00Thanks a lot for your support. The above solution works like a charm.
Now I got a further question and I hope it should be the last one: How I can play with the layout/template of search results page? Can I change it as per my requirement and if yes, provide me relevant filters/hooks please.
Thanks a lot for your support. The above solution works like a charm.
Now I got a further question and I hope it should be the last one: How I can play with the layout/template of search results page? Can I change it as per my requirement and if yes, provide me relevant filters/hooks please.
Quote from Pablo Borysenco on April 17, 2023, 10:48Hello
My plugin does not affect products template, current theme template is used to display results. so you just need to change the template of the current theme
Hello
My plugin does not affect products template, current theme template is used to display results. so you just need to change the template of the current theme