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

Thread: A great idea for OR, but I need to do this myself anyway

  1. #1
    Join Date
    Sep 2008
    Posts
    94

    Default A great idea for OR, but I need to do this myself anyway

    Hi,

    I'd like to create a lookup table. Let's say one of the listing fields is "Country" and the 2nd is "City". I'd like to city to be dynamically updated according to the country. For example. If someone pics Egypt, they are given a choice of cities within Egypt. Does that make sense?

    I heard you can do this with Ajax, but how exactly would put this in the code?

  2. #2
    Join Date
    Feb 2007
    Posts
    82

    Default Re: A great idea for OR, but I need to do this myself anyway

    This has already been done by pbflash, look in the free addon section. It is called something like state/city select, you just need to change it a bit for country/city.

    Tony

  3. #3
    Join Date
    Sep 2008
    Posts
    94

    Default Re: A great idea for OR, but I need to do this myself anyway

    Quote Originally Posted by asnorth View Post
    This has already been done by pbflash, look in the free addon section. It is called something like state/city select, you just need to change it a bit for country/city.

    Tony
    Hi Tony. Thanks for the response. See, I downloaded the pbflash addon. I think its called ajaxsearch. But it doesnt explain how to use it for your particular site. I mean, I'm not in the US and I don't want to use US state/cities.
    How do I go about doing this then with pbflash?

    THanks.

  4. #4
    Join Date
    Mar 2008
    Location
    Santa Barbara, California
    Posts
    83

    Default Re: A great idea for OR, but I need to do this myself anyway

    I suppose in OR and everywhere they are called Chain Selects.

    This is the addon you want to use for a two level for areas/areas within the main area.

    http://support.open-realty.org/showthread.php?t=14377

    /data/states/ is where you could rename a state file like "Egypt" and with that xml file you could put like "Cairo" or whatever cities you wanted.

    I would recommend NOT to change the folder names, or the addon code just the data. No one sees code and it would be more likely broken if you edited the addon file versus leave the naming convention and change the displayed data.

    If you are still have problems. Pm Me and I will give you more detailed steps. I just dled the addon myself to look at so I have a reference if you ask.

    ALSO , MAYBE you need a more dynamic solution such as country,state,city like a three level, not sure if this could be modified to do it, or I bet it can , its just time/$ but its a <b>3</b> level chain select.

    http://support.open-realty.org/showthread.php?t=15776

    hope I have helped guide you.

    State= country / region
    within those files is the list of cities/smaller regions.

  5. #5
    Join Date
    Sep 2008
    Posts
    94

    Default Re: A great idea for OR, but I need to do this myself anyway

    Quote Originally Posted by jonny827 View Post
    I suppose in OR and everywhere they are called Chain Selects.

    This is the addon you want to use for a two level for areas/areas within the main area.

    http://support.open-realty.org/showthread.php?t=14377

    /data/states/ is where you could rename a state file like "Egypt" and with that xml file you could put like "Cairo" or whatever cities you wanted.

    I would recommend NOT to change the folder names, or the addon code just the data. No one sees code and it would be more likely broken if you edited the addon file versus leave the naming convention and change the displayed data.

    If you are still have problems. Pm Me and I will give you more detailed steps. I just dled the addon myself to look at so I have a reference if you ask.

    ALSO , MAYBE you need a more dynamic solution such as country,state,city like a three level, not sure if this could be modified to do it, or I bet it can , its just time/$ but its a <b>3</b> level chain select.

    http://support.open-realty.org/showthread.php?t=15776

    hope I have helped guide you.

    State= country / region
    within those files is the list of cities/smaller regions.
    Johnny,

    I just wanted to quickly say thanks for your post. I'm trying to implement this new change in my code.

    Thanks a million for you help.

  6. #6
    Join Date
    Mar 2004
    Location
    Windsor, Ontario, Canada
    Posts
    380

    Default Re: A great idea for OR, but I need to do this myself anyway

    This is a great addon but I would like to know if there is a way to make it select the options form a database instead of the xml file, that way it will not show make/models, state/cities which are not listed. I know this can be done because there was one for OR 1.x. I just cannot find it on here anymore or even on my computer to see how it was done.

    Thank You

  7. #7
    Join Date
    Mar 2008
    Location
    Santa Barbara, California
    Posts
    83

    Default Re: A great idea for OR, but I need to do this myself anyway

    Yes it would require some modification to do some MYSQL select queries to pull from the OR db Listing elements table, most likely it would have to be hard coded to use a certain naming convention. Etc but its definitely possible.

    You might want to try agent the agent search addon. I have since created my own custom one which is still in development as I had a bit different needs but I remember it had some sort of I believe, chain select but pulled from the db, it would probably be closer to what you are looking for.

    If not PM me and we I will look into the issue.

  8. #8
    Join Date
    Dec 2004
    Location
    German, since 2000 in Spain
    Age
    50
    Posts
    826

    Default Re: A great idea for OR, but I need to do this myself anyway

    http://support.open-realty.org/showpost.php?p=15297

    Did you mean this thread??
    If you manage to convert this into a 2.5 addon for state/city (or what ever chained select) please remember me and send me a copy

  9. #9
    Join Date
    Mar 2004
    Location
    Windsor, Ontario, Canada
    Posts
    380

    Default Re: A great idea for OR, but I need to do this myself anyway

    This is it, thank you. Now I have something to work with. Do not wait arround for me to finish it though, I am not a programmer. I just modify codes.

    I will give it my best shot.

    Someone who really knows php should try and combine this with the one for 2.x.

    Thanks again

  10. #10
    Join Date
    Dec 2004
    Location
    German, since 2000 in Spain
    Age
    50
    Posts
    826

    Default Re: A great idea for OR, but I need to do this myself anyway

    ---!! MODERATED BY MYSELF !!---

    Just noticed that my last post was against the forum rules!
    Sorry for this!

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
  •