Results 1 to 6 of 6

Thread: Rounding Prices in Min-Max Set-up...

  1. #1
    Join Date
    Oct 2007
    Location
    Central-Illinois
    Age
    43
    Posts
    101

    Default Rounding Prices in Min-Max Set-up...

    This is from another thread...
    http://support.open-realty.org/showthread.php?t=20900

    Hopefully, this can be done, as it's REALLY frustrating to the site visitors (I've been asked about it three times in the past week). After spending countless hours trying to correct it, I'm stumped.

    For an example of the problem, go here...
    http://www.msbafyi.com/index.php?pclass[]=1&action=search_step_2
    ...and try searching by "List Price"... Now, you understand the irritation - LOL.

    Any ideas here?? I'm willing to entertain any suggestions, at this point. :-)

    - Nick B.

  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: Rounding Prices in Min-Max Set-up...

    Use a step value of 50000 for your price field.
    "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
    Oct 2007
    Location
    Central-Illinois
    Age
    43
    Posts
    101

    Default Re: Rounding Prices in Min-Max Set-up...

    That DID make the numbers appear a little nicer, but it made it so a user can ONLY use values every $50,000.00..... Not bad, if local housing prices were in the $500K+ range, but they're not... Is there a way to force the range options to step from $5,000 to whatever the highest listing price is (using $5,000 increments), without hard-coding the form? Not that hard-coding it is out of the question (I've done it on several of my other sites, for various reasons), but I'm just not sure why this is even a problem... Is it a bug?

    - Nick B.

  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: Rounding Prices in Min-Max Set-up...

    Quote Originally Posted by nick-b View Post
    Is there a way to force the range options to step from $5,000 to whatever the highest listing price is (using $5,000 increments), without hard-coding the form?
    Use a step value of 5000.
    "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
    Jul 2004
    Posts
    35

    Default Re: Rounding Prices in Min-Max Set-up...

    Quote Originally Posted by the_sandking View Post
    Use a step value of 5000.
    Is it or would it be possible to change the core files to have a variable step value.

    100,000 - 200,000 - step value = $20,000
    250,000 - 500,000 - step value = $50,000
    500,000 - 1,000,000 - step value = = $100,000


    Charlie

  6. #6
    Join Date
    May 2003
    Location
    San Jose, Costa Rica
    Age
    38
    Posts
    117

    Default Re: Rounding Prices in Min-Max Set-up...

    The problem here is actually rounding out the number. It's easy to round up or down a number with .93 or .23 but i'm not to sure how to go about rounding up or down in this case. Your best bet would be to increment in 5,000 so the numbers are more even.

    Thinking outside the box here... What about simply doing substr on this and then adding the 0's. It's going to mess up where the number is 123923 for example as it would become 123000.

    EDIT: I just checked the code and the weird thing is that is already has a substr_replace doing the same thing I just mentioned above. I wonder why it's not working in your case.

    Code:
    substr_replace($min, '000', -3);
    I will eventually need to create an addon for the price based on ranges. For example I want people within the lower limits to be able to choose in increments of $5,000 but once in the millions they should choose in increments of $100K. I think that would make the most sense to solve this problem. However there is really no "easy" way to do this. I just need to spend the time to make an addon.

    There is obviously a need for this since i'm sure your not the only person with this problem. My problem is that the content in the boxes is SO long that it's adding tons of extra size to the page.
    Regards,

    Nick

    Over 2100 Costa Rica Real Estate listings at TicoVista.

    -- PLEASE DO NOT SEND ME LINK OR LISTING EXCHANGE REQUEST --

Similar Threads

  1. Rounding min-max values
    By nedbenj in forum General Help (CLOSED)
    Replies: 1
    Last Post: 03-23-2009, 05:13 PM
  2. Prices in different €, Ł, US$, R$
    By Henristrike in forum Addon help, ideas and discussion (CLOSED)
    Replies: 1
    Last Post: 05-20-2007, 10:59 AM
  3. Rental Prices have Sales prices in drop downs
    By bmarker in forum General Help (CLOSED)
    Replies: 7
    Last Post: 10-17-2006, 02:49 PM
  4. Rounding the values of the price range pull down menu?
    By wwwd in forum General Help (CLOSED)
    Replies: 0
    Last Post: 04-03-2006, 09:43 AM
  5. Rounding MinMax values
    By erenger in forum Mods (CLOSED)
    Replies: 4
    Last Post: 09-08-2004, 10:31 AM

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
  •