Support Forum

Content of the article

WPBE - WordPress Posts Bulk Editor Professional
You need to log-in to create request (topic) to the support

Filter results validation for length and width

(new from 01-07-2019)
If you not got email within 24 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here.
The support doesn work on saturdays and sundays, so some Friday requests can be answered on Monday.

Hi,

I have two sliders filters, the width and the length (i guess it's meta data)

If costumer filter the width, let's say >100cm and no products are found.... but there are products with >100cm in length... I wanted them to show up.

How to both filters reverse each other value before and then show the results.

Right now, the workaround is a button at the No Product Found page, with the URL parameter reversed, forcing the costumer to click, like this:

if costumer filter /?swoof=1&slider__width=293-600&slider__length=1-207

then the button says "Sorry, try the reverse search to find more products...." then links to: /?swoof=1&slider__width=1-207&slider__length=293-600

 

 

I wrote in the wrong support, now it's right. I've tried to get the data from woof_products_query, or woof_get_request_data. But I can't debug it right the data, anyone has any idea to help? Thanks!

Hello

Try  to  use - https://products-filter.com/hook/woof_get_meta_query/  to get meta data

But the problem is that you need to make changes after the search

 

 

That's exactly! How to make changes after the search? I didn't resolve yet, how to use a filter that returns all results to check if it's "no product found" (zero results). And then refresh a new page (new search) or new ajax search.

Something is confusing me, I can't understand the flow.

Hello

in this  case  use filter to change global $wp_query

Check it -  $wp_query->have_posts()

If there are no products - change the arguments and create a new WP_Query()