Advertisement:

Author Topic: Create an almost duplicate of Price search (which takes 2 values)? [SOLVED]  (Read 758 times)

ben_dchost1

  • Jr. Member
  • **
  • Posts: 92
Hello guys,

I am trying to improve the search feature for my website (which is an 'office-let' website).

What I'm trying to add is a search by size feature in the search category. I am struggling to find a way to implement this, and I did try creating a custom field and going through it like that, but realistically, I need to assign two values as a range and unfortunately, custom fields-search only deals with single values (would be nice if they implemented a range option).

However, the behaviour of what I'm looking for is identical to the price search feature, which takes 2 values, a min price and a max price. If I could somehow replicate that but instead of price it looks at the custom field Size(m²) and then the user can search by specifiying a min size and a max size...

Can this be done? And if so how do I go about implementing it? Assuming I can almost copy and paste the price field code and then, somehow point it to the size custom field? Do I need to touch PHP admin at all?

Thanks!

« Last Edit: July 09, 2014, 11:48:18 am by ben_dchost1 »

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: Create an almost duplicate of Price search (which takes 2 values)?
« Reply #1 on: July 02, 2014, 06:29:16 pm »
take the function out of the real-estate theme.  cannibalize!

ben_dchost1

  • Jr. Member
  • **
  • Posts: 92
Re: Create an almost duplicate of Price search (which takes 2 values)?
« Reply #2 on: July 03, 2014, 01:58:04 pm »
@design

Not a bad shout. I will attempt this!

Please keep suggestions coming! :)