*

Destanst

  • *
  • 3 posts
Is it possible to make a filter based on custom fields values?
« on: January 04, 2025, 01:37:17 PM »
Hello, I am wondering if it is possible to use custom fields' values in another search field, not using the custom fields for search directly. (allowed search is unticked in the settings)
For reference, here's a Bedrooms field and a me-written filter section (Basically a Price field code).
Pictures are attached below.
Thank you in advance!

*

Destanst

  • *
  • 3 posts
Re: Is it possible to make a filter based on custom fields values?
« Reply #1 on: January 06, 2025, 06:52:34 PM »
I guess I'll have to rephrase my question a little bit.
Inside of my phpMyAdmin database I have a table called 'oc_t_item_meta' that contains all the custom fields and values to them.
My question is, can I somehow make a filter that displays ads based on specific range of said field values?
If possible, I would like to hear some suggestions about how to write the code for it. (I work in search.php on that one)
Thank you in advance!

*

MB Themes

Re: Is it possible to make a filter based on custom fields values?
« Reply #2 on: January 06, 2025, 08:19:02 PM »
You can only add custom field to search form, but range filter is not available.
You might achieve such functionality using ie Attributes Plugin: https://osclasspoint.com/osclass-plugins/extra-fields-and-other/attributes-osclass-plugin-i77
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Destanst

  • *
  • 3 posts
Re: Is it possible to make a filter based on custom fields values?
« Reply #3 on: January 07, 2025, 03:41:05 PM »
If the range filter such as Min/Max is not available in custom fields, I am willing to take my time and write it from scratch.
However, I need to know what piece of code is responsible for display of sorted ads.