All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Range search on 2 fields

Tiziano 17 May 2018 09:17 question, complete

Hello,

I'm working on EE3.5.10 and LowSearch v5.

I'm working on a products catalog and I try to search by price. With “range:field_name” all works correctly, but I've some issues with products promotions.

I manage product price in a field “price_product” and, if present, the promo price on “promo_price_product” field. If the promo price is not present the “promo_price_product” will be empty.

For example, consider the product “A” with price_product = 259 and promo_price_product = 199.

Of course when I search with “range: price_product” = 0|250" the product A will not appear on search results because the price is not on range.

There is a way to consider both field to make the search and let the product A be considered on this example search?

Thanks in advance,

Tiziano

Replies

  1. Low 17 May 2018 09:22

    No, using the Ranges filter like this, will target a single field. You're probably better off switching the fields around, so you have price_product = 199 and (something like) discounted_from = 259. That way you still should be able to show the user a product is discounted, but the field used in searching/filtering is still a single field.

  2. Tiziano 17 May 2018 12:39

    Thanks again!