Advertisement:

Author Topic: Region / City drowdown or ajax City in sidebar  (Read 1722 times)

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Region / City drowdown or ajax City in sidebar
« on: February 25, 2016, 11:27:21 pm »
Hello. I would like to replace the simple City input in sidebar with the ajax City that exists in Modern or Bender or with dropdowns for Region and based on the selected region, show its cities. Anybody managed to do it?

I tried and i can get the dropdown with regions which is ok but for city i get a huge list with all the cities from all regions instead of show the ones from the region i chose.

What's even more frustrating is the fact that in publish a listing or in user account we have the dropdowns which works just fine. I hate when a standard feature is used in a area and in another we have something else, worse.

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Re: Region / City drowdown or ajax City in sidebar
« Reply #1 on: February 26, 2016, 10:11:59 am »
This http://forums.osclass.org/jobs/cities-dropdown-based-on-region-select/15/ is the code that works with 2 issues:
1. after you make one search, city selection is gone and you have to select again region and city
2. the search address shows the id's for region and city instead of their names

Any solution to these?

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Re: Region / City drowdown or ajax City in sidebar
« Reply #2 on: February 26, 2016, 10:45:05 am »
if i change
<?php $regionId = $_GET[sRegion]; ?>

with

<?php $regionId = $region['pk_i_id']; ?>

after initial search, region dropdown is ok and in city dropdown i see the list of cities but they are always the same, no matter from which location you started, so still wrong.