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

Urgent: Inquiry Regarding Combining Work Attributes with OR Condition

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.

We have a critical requirement regarding the combination of all work attributes with an OR condition. We urgently need to determine if this is feasible within our current setup.

For example, when we select Gen5 (3.3mmD, 3.7mmD, 4.2mmD) and 3.5mmD, both are currently displaying data using the AND condition. However, we need to display data for both selections without filtering for common data. Is it possible to achieve this functionality with the plugin we are using?

We kindly request your immediate attention to this urgent matter. Your prompt response would greatly assist us in resolving this issue promptly.

Please check the provided page URL for reference: https://paragonimpldev.wpengine.com/shop/

Thank you for your assistance.

Best regards

Hello

Unfortunately the plugin does not have such a feature.

In this case you need code customization

Hello Pablo Borysenco,

Thank you for your response.

Could you please provide suggestions on how to implement this functionality through plugin customization? It would be helpful if you could provide guidance when we review this plugin.

Thank you

use standard woocommerce hooks  woocommerce_product_query  and  https://products-filter.com/hook/woof_products_query    OR  https://products-filter.com/hook/woof_get_tax_query

To intercept the request and change it

Hello Pablo Borysenco,

Thank you for your response.

We currently lack detailed knowledge about this. If possible, could you please provide an example with an explanation of how to set up a condition using two attributes with an OR query? With this reference, we will be able to implement the logic for all remaining attributes.

Please review this request and let me know if any additional information is required from my end.

Thank you

 

 

 

hello

if you have no programming experience you should hire a developer.  Because working with logic is not as simple as it might seem

On my part, I provided all the necessary information

Documentation for changing query parameters - https://developer.wordpress.org/reference/classes/wp_query/#taxonomy-parameters

add_filter('woof_get_tax_query', 'my_woof_get_tax_query');
function my_woof_get_tax_query($tax_args){
//do smth here
$tax_args['relation'] ="OR";

return $tax_args;
}

We added this code, and we found this type of array

Array
(
[relation] => OR
[0] => Array
(
[taxonomy] => pa_implant-system
[field] => slug
[terms] => Array
(
[0] => nizplant-dual-function
)

)

[1] => Array
(
[taxonomy] => pa_platform-size
[field] => slug
[terms] => Array
(
[0] => 4-5mmd
[1] => nizplant-platform
)

)

)

But my filter stops the working, Please suggest what is missing in this

 

Hello

But my filter stops the working, - please describe this in more detail: was there a fatal error or does the filter not affect the products?