0 Members and 1 Guest are viewing this topic.

*

richard1969

  • *
  • 15
  • osDate Version: osDateEvo v1.3
Country - counties - cities
« on: May 07, 2018, 02:56:08 PM »
Hi all,

Just came across something which i could'nt figure out.
I'm from the Netherlands and my site will be mainly focussed on the Netherlands.
Now when a user signes up it will choose a country (Netherlands) next there is the State / province choice to make.
After that th new user can choose a County , but the Netherlands has no Counties  :o
So the user cannot choose a City which comes next.

I checekd in Admin but there's no Counties CSV to load into the DB.
If i disable the counties the user is not presented with the Cities list (choice)

So how can i bypass the Counties selection and still display the Cities as a choice for the new user?

*

Pharg

  • *****
  • 3,118
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #1 on: May 07, 2018, 10:32:31 PM »
Hi richard1969,

Go to the admin, then go to Site's Global Settings, then go to User Controls in the drop down at the top, then find
Accept county/district? Yes change to No
also do it to the next line being
County/district to be made mandatory field? Y change to No

They will not be in the signup now.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35

*

richard1969

  • *
  • 15
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #2 on: May 07, 2018, 10:43:22 PM »
Thank you,

Tried that already, but then the cities box stay’s empty. So they cannot select the city from a dropbox.
I gues it has to do with the countie / district box being disabled, therefore there is no info which cities should be loaded into the cities box?

 

*

Pharg

  • *****
  • 3,118
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #3 on: May 07, 2018, 11:29:48 PM »
Hi richard1969,

You will need to load your cities, since there is no Netherlands.csv you will either have to download them
from online or make a csv file for Netherlands.

I myself just leave the people to type the cities in, but you can do it for them if you wish.
« Last Edit: May 07, 2018, 11:46:52 PM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35

*

richard1969

  • *
  • 15
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #4 on: May 07, 2018, 11:53:35 PM »
Sorry maybe i express myself wrong but:

Countries are available and loaded in db,
States are available and loaded in db.
Counties / districts are NOT available and not loaded in DB.
Cities are available and loaded in db.

When disabling counties in admin then cities are not loaded in the dropbox for selection by the user.
Which also means that it is not possible tomake use of the next item on registration the zipcodes.
And all zipcodes in the Netherlands are also available.

I understand people can type there city during the registration, but when people start typing you know whats gonna happen they mistype or invent imagenary cities.

If there is a way to bypass the counties selection then it could be solved.

I will look at the db structure tomorrow to see what fields are used in the different tables maybe the answer is there somewhere.


*

Pharg

  • *****
  • 3,118
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #5 on: May 08, 2018, 01:00:17 AM »
Hi richard1969,

No, it was clear, as I said there is no new Netherlands-Cities.csv for the Cities, Just a old file that might have errors in it.

I have attached the signup process based in the USA and all of them have drop downs for each
Country, State, City and Zip, you will also notice I have counties turned off.

It's working fine as it is, you need to make a New Netherlands-Cities.csv File to load to the Database or check the old one doesn't have a error in it, since I am not from that area, you would be the better person to find the error.
« Last Edit: May 08, 2018, 03:51:48 AM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35

*

Pharg

  • *****
  • 3,118
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #6 on: May 08, 2018, 06:37:38 AM »
Hi richard1969,

I found why the Netherlands wasn't working, the Netherlands_states.csv and the NL_cities.csv
were completely wrong, I have attached the fixed Netherlands_states.csv below.

Will add NL_cities.csv when it's working correctly and I have to find why the zips are not loading correctly with these files.

These first files were not created by me so it's not my error just so you know but the new ones below are made by me.
« Last Edit: May 08, 2018, 08:09:34 AM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35

*

Pharg

  • *****
  • 3,118
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #7 on: May 08, 2018, 12:04:32 PM »
Hi richard1969,

Here is the fixed NL_cities.csv and the Netherlands_states.csv attached that works.
Feel free to correct the cities names and share it with us please?

Zips and Postal codes still won't work as yet, they seem to have the State-Codes, County-codes and
the city-codes missing in the zipcodes.
« Last Edit: May 08, 2018, 11:25:13 PM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35

*

richard1969

  • *
  • 15
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #8 on: May 08, 2018, 12:53:16 PM »
Hi Phill,

Thank you i was playing around with it too.
 I see you have filled the "county field" with the name of the Province.
I tried it with an empty "county field" and that also works

I Will check your NL_cities.csv to see if there something missing or misspelled.
Don't worry about the Zip codes I'll see what wrong or missing and then try it first.

Many thanks for the help.
Best regards,
Richard

*

richard1969

  • *
  • 15
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #9 on: May 08, 2018, 01:28:16 PM »
Hi Phill,

I just tested the zipcodes for the Netherlands.
In the csv-files there are only 3 fields listed. Just the zipcode, latitude & Longitude.
What's missing is the Statecode - Countycode - Citycode !
If 1 is missing the zipcodes wont work in the profiles or signup forms.

I will try to find an updated zipcode file for the Netherlands so we can complete them.

Best regards,
Richard

*

Pharg

  • *****
  • 3,118
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #10 on: May 08, 2018, 11:28:06 PM »
Hi richard1969,

Thank you, I already saw the Statecode - Countycode - Citycode was missing in the Zipcodes / Postcodes.

Found this:
http://www.geopostcodes.com/Netherlands
and also here:
https://www.aggdata.com/free/netherlands-postal-codes


Please keep us updated?
« Last Edit: May 08, 2018, 11:33:33 PM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35

*

Pharg

  • *****
  • 3,118
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #11 on: May 10, 2018, 10:35:07 PM »
Hi richard1969,

I made this Netherlands_zips_0001.csv and converted it to a Netherlands_zips.sql for the Zips/Postal Codes for you.

I am not sure how accurate it is, I got the Post codes from here https://www.aggdata.com/free/netherlands-postal-codes and added all the rest of the data.

I found when I tried to load using the Load zips using the Netherlands_zips_0001.csv it was still not putting in the State-Codes, County-codes and the city-codes, so that's why I converted the Netherlands_zips_0001.csv to a Netherlands_zips.sql

Until I find why the admin load_zips.php / load_zips_split.php or the managezips.php are not adding the State-Codes, County-codes and the city-codes in Netherlands but does in USA you will have to import the Netherlands_zips.sql

Import into your osdate_zips Database tables.
If your Database prefix in not osdate_ then you will need to edit the `osdate_zips` and change to what your prefix name is before you import it.

So go to the phpMyAdmin then to your Database, go to osdate_zips then import the Netherlands_zips.sql and that's it.

It might have some Postal codes missing as I don't know the Netherlands but I am sure you can add the missing codes and spelling mistakes if any and the give me a working copy so I can convert to a csv file.

« Last Edit: May 11, 2018, 01:35:09 AM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35

*

Pharg

  • *****
  • 3,118
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #12 on: May 11, 2018, 06:48:30 AM »
Hi richard1969,

I have fixed the Netherlands zipcodes loading and the added the updated files below.

Unzip both files attached below then before you upload the new Netherlands folder, go to the zipcodes folder and rename the current Netherlands folder to Netherlands_old then upload the new Netherlands folder into the zipcodes folder.

Then upload the admin folder and over write the current admin/load_zips_split.php with the
new file admin/load_zips_split.php

You will find the Netherlands Zips will now load fine with all the needed data.

Feel free to update any missing postal codes and share with me?
« Last Edit: May 11, 2018, 09:35:10 AM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35

*

richard1969

  • *
  • 15
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #13 on: May 11, 2018, 04:02:20 PM »
 8) you are the man  :D
Thanks for your hard work.
I will download and give the zips a try next week.
After that i will run over the Dutch zips to see if something is missing or misspelled.
I will let you know asap.

First i have to move one of my companies to a new building  :o

Have a great a weekend

*

Pharg

  • *****
  • 3,118
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Country - counties - cities
« Reply #14 on: May 11, 2018, 09:34:36 PM »
Hi richard1969,

Your welcome, the zip version removes the extra 0 in the Post codes that the sql adds.

Have fun moving with the company.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35