Home / Help / Tutorials, Guides & FAQs / DJ-Classifieds tutorials and guides / How to change filter logic for checkboxes in search module
Thursday, 28 March 2019 16:25
Modified: Thursday, 11 April 2019 12:50

New filter logic

There is a new type of behavior for the checkbox field in DJ-Classifieds custom fields.

If you are using the search option for the field, you can select two or more fields, and in the results, you can see the ads that include all the selected fields.

Previously, the displayed results contained the chosen fields, but it did not automatically mean that the advert included everything that was marked - it was enough that it contained at least one of the selected fields to be displayed in the list. Now you have the choice!

Let’s see how to configure this option at the backend.

Open the DJ-Classifieds component and choose “Fields.”

Choose an existing field or create a new one. Go to “Search options” tab.

search filter configuration

 

  1. - “In search” must be set to “Yes.” Without that the other option won’t be available.
  2. - “Search type” must be set to “Checkbox.” This option works with the checkbox only.
  3. - “Search filter logic” interests us the most here.

As you can see there are two possibilities to choose from:

  • Or” - choose it and the results will be filtered with any of the selected values
  • And” - choose it and the results will be filtered with all selected values (this it the new option for DJ-Classifieds)

Configuration with the “or” option enabled.

On our example, for DJ-Classifieds configuration we have used fields called “External features.” They will be used for filtering results from “Real Estate” category with “parking” and “garden.”

There are five results displayed for this category at the moment. Displayed ads include “parking” or “garden.”

Let’s see how it looks on the front page.

results for or option

Configuration with the “and” option enabled.

There are 2 results displayed for this category at the moment. Displayed ads include “parking” and “garden

results for and option


Found this article interesting? Subscribe for more.
Or share this article with your friends.

Subscribe to the Telegram bot / Subscribe to the Messenger Bot
 
User Rating:  (0)
PoorBest
 

DJ-Classifieds

Ultimate classified ads solution for Joomla.

Learn more