Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Sort by square feet low to high and high to low on search results page

  1. #1
    Join Date
    Feb 2011
    Posts
    62

    Default Sort by square feet low to high and high to low on search results page

    Hi,

    Is there way to have a low to high and high to low button (for square feet) on the search results page ? I have looked in help file and can't seem to find what I'm looking for.

    Many thanks
    Joe

  2. #2
    the_sandking's Avatar
    the_sandking is offline hadron remnant - Moderation Fachmann
    Join Date
    Apr 2003
    Location
    Nullspace
    Posts
    5,289

    Default Re: Sort by square feet low to high and high to low on search results page

    You might want to explain what you are trying to do in a lot more detail. You aren't going to find "high and low buttons" in the docs.
    "Much of what looks like rudeness in hacker circles is not intended to give offense. Rather, it's the product of the direct, cut-through-the-BS communications style that is natural to people who are more concerned about solving problems than making others feel warm and fuzzy."

    "We gotta' go to the crappy town where I'm a hero!"
    -Hoban 'Wash' Washburne 2485-2519


    "When you’re born you get a ticket to the freak show. When you’re born in America, you get a front-row seat.."
    -George Carlin 1937-2008

    New to Open-Realty® and need help? Check the:
    -OR DOCUMENTATION -

    Important: Read this at least once in your lifetime
    How To Ask Questions The Smart Way

  3. #3
    Join Date
    Feb 2011
    Posts
    62

    Default Re: Sort by square feet low to high and high to low on search results page

    Hi,

    Thats fair enough

    What I would like to do is say someone searchs for properties of 2000 square feet. This down to a script I wrote (the one I got told off for haha!) gives everything -+800 of 2000 (or any number written into the square feet box) for example i enter 2000 and it gives me the range from 1200 to 2800.

    What I would like to be able to do is one its found the results is put it into accending or decending order by square feet EG:

    1200 / 2300/ 2400 Or 2400 / 2300 / 1200

    Depending on what button the user clicks on.

    Is this possbile in Open realty?

    Thanks alot
    Joe

  4. #4
    the_sandking's Avatar
    the_sandking is offline hadron remnant - Moderation Fachmann
    Join Date
    Apr 2003
    Location
    Nullspace
    Posts
    5,289

    Default Re: Sort by square feet low to high and high to low on search results page

    Still not sure what you are wanting to do, you may want to investigate the static "sortby" options for the search results page.
    "Much of what looks like rudeness in hacker circles is not intended to give offense. Rather, it's the product of the direct, cut-through-the-BS communications style that is natural to people who are more concerned about solving problems than making others feel warm and fuzzy."

    "We gotta' go to the crappy town where I'm a hero!"
    -Hoban 'Wash' Washburne 2485-2519


    "When you’re born you get a ticket to the freak show. When you’re born in America, you get a front-row seat.."
    -George Carlin 1937-2008

    New to Open-Realty® and need help? Check the:
    -OR DOCUMENTATION -

    Important: Read this at least once in your lifetime
    How To Ask Questions The Smart Way

  5. #5
    Join Date
    Feb 2011
    Posts
    62

    Default Re: Sort by square feet low to high and high to low on search results page

    Hi,

    I have looked at that be doesn't do anything :(

    What I want is like you get in ebay. You search for an item and once you've searched you can select from a drop-down list "Price: Lowest to Highest" or Price: Highest to Lowest".

    Except I want the drop down list to do "Square Feet: Lowest to Highest" or "Square Feet: Highest to Lowest"

    and then sort those listings into which ever is selected

    Is that anymore sense?

  6. #6
    the_sandking's Avatar
    the_sandking is offline hadron remnant - Moderation Fachmann
    Join Date
    Apr 2003
    Location
    Nullspace
    Posts
    5,289

    Default Re: Sort by square feet low to high and high to low on search results page

    Yup, you can do that with by passing the sortby and sorttype $_GET vars, assuming your square feet field is set to be searchable.

    ?action=searchresults&sortby=sqfeet&sorttype=ASC (low to high)

    and

    ?action=searchresults&sortby=sqfeet&sorttype=DESC (high to low)
    "Much of what looks like rudeness in hacker circles is not intended to give offense. Rather, it's the product of the direct, cut-through-the-BS communications style that is natural to people who are more concerned about solving problems than making others feel warm and fuzzy."

    "We gotta' go to the crappy town where I'm a hero!"
    -Hoban 'Wash' Washburne 2485-2519


    "When you’re born you get a ticket to the freak show. When you’re born in America, you get a front-row seat.."
    -George Carlin 1937-2008

    New to Open-Realty® and need help? Check the:
    -OR DOCUMENTATION -

    Important: Read this at least once in your lifetime
    How To Ask Questions The Smart Way

  7. #7
    Join Date
    Feb 2011
    Posts
    62

    Default Re: Sort by square feet low to high and high to low on search results page

    Hi,

    Thanks alot. I have done a test search and it returns nothing. Where do I apply this to?

    I have done a search and pasted the index.php string from browser:

    index.php?square_feet-min=1200&square_feet-max=2800&action=searchresults&pclass[]=6

    Do I have to write what you gave me into the search results 6 page as a link and when its pressed it will trigger the highest to lowest script and vice versa?

    Thanks alot for your help
    Joe

  8. #8
    Join Date
    Feb 2011
    Posts
    62

    Default Re: Sort by square feet low to high and high to low on search results page

    Hi,

    Any ideas on this at all? I have tried loads of things and nothing seems to work at all. It either doesn't do anything or displays a whole list of all of the properties (but still doesn't sort)

    Any help would be great as this is the last thing holding me up

    Thanks alot
    Joe

  9. #9
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: Sort by square feet low to high and high to low on search results page

    "Sort by" at search result page is default at Open-Realty "Lazuli" site template.
    For example, go to: http://demo.open-realty.org/searchresults.html - click at "Price" and it will be sorted. The same for the other fields. This is configured at backend and set at the template file. Look "Lazuli" search result HTML template files and you will see how it is set. Also reading O-R DOCs is recommended.

    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  10. #10
    Join Date
    Feb 2011
    Posts
    62

    Default Re: Sort by square feet low to high and high to low on search results page

    Hi,

    Thanks alot for your help I did read the docs on this but obviously missed the part with Static Sortby as that was turned on and stopping it from working!

    I have tried the above code and it still doesnt work so what I did was this:

    I searched for property with 2000 square feet and that showed below link:

    Code:
    index.php?square_feet-min=1200&square_feet-max=2800&action=searchresults&pclass[]=6
    I then added "&sortby=square_feet&sorttype=DESC" to the end so it looked like:

    Code:
    index.php?square_feet-min=1200&square_feet-max=2800&action=searchresults&pclass[]=6&sortby=square_feet&sorttype=DESC
    and it worked fine. How do I make it add the "&sortby=square_feet&sorttype=DESC" to the end of the search string once its searched?

    By that i mean is it something you can do in open realty (I don't want some one to actually code it for me)

    Thanks alot
    Joe

Similar Threads

  1. set up search by square feet
    By MouseClicks in forum General Help (CLOSED)
    Replies: 0
    Last Post: 02-05-2009, 05:52 AM
  2. square feet AND square meters automatically?
    By Estrella in forum Installation/Configuration Help (CLOSED)
    Replies: 4
    Last Post: 09-01-2008, 09:44 PM
  3. square feet and square meters
    By exodo in forum Addon help, ideas and discussion (CLOSED)
    Replies: 0
    Last Post: 07-27-2007, 02:19 PM
  4. High End Shildeshows
    By h_man72 in forum Addon help, ideas and discussion (CLOSED)
    Replies: 0
    Last Post: 02-09-2007, 02:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •