Author Topic: Easier way to add zip codes  (Read 3197 times)

tpandtp

  • Active Member
  • ***
  • Posts: 47
  • Karma: +0/-0
    • Adelaide Playtime
Easier way to add zip codes
« on: January 02, 2008, 06:56:01 AM »
I have entered all of my cities and the coresponding lat & long for my country, about 300 of them.
Then when I went to add the zip codes for these cities, etano wants me to add the lat and long again.
As it took me 6 hours the first time  I am not really excited about the thought of having to do it all over again.

Looking at the database it doesnt look to difficult to have a mysql string to copy most of the data over that has already been entered and then all I need to do is add zip codes.

How about this also be added into the basic script as well. Its a lot of work entering all lats and longs twice for all users out of the US.

While I am at it, just a simple update needed, the country code for Australia is AU, not the default country code.

maverick

  • Administrator
  • Veteran Member
  • *****
  • Posts: 2971
  • Karma: +210/-7
    • Maverick Webworks
Re: Easier way to add zip codes
« Reply #1 on: January 02, 2008, 09:40:20 AM »
If what you're doing is trying to enter all the cities, states, lats & longs plus zip codes for a large country individually through the Etano admin panel. This really isn't the proper way to do it, adding info in the admin is more for if you just have a small country or just a few cities to add that maybe were missed or not included in the database for a country that's already installed.

You have to get your hands on a database for your country with all the info you require and have it configured for installing to the Etano database. Often the easiest way is to get a database and then convert it to a CVS file, which is basically a simple text file that can also be uploaded to MySQL.

Also, I've always felt using postal codes for a mileage or distance meter is a bad idea and not a very efficient way to do it. Especially for countries other than the US, and here's why ...

1. Many countries such as Canada, UK and Australia have a very complex postal code system. For example, in Canada there's can be thousands of postal codes for one city which is going to equate to a very large database. A database for Canada with zip codes is around 100mb, whereas a US database is less than 20mb, and I've found that UK and Australia databases are similar. In Canada and UK postal codes change every few blocks, not by district or every so many miles, which makes postal codes for these countries pretty redundant as there's no need to know the distance under a couple miles (usually 5 miles).

2. Most countries other than the US don't make zip or postal codes freely available and open to the public and therefore you have to pay for it. Sure I know if you're lucky and do enough searching you can maybe find databases on the net that have postal codes included, however having done much research into this I've found that they are often very outdated and sometimes not very accurate, which brings me to #3.

3. With countries such as Canada, UK and Australia, their postal codes are so complex and always being changed and updated, you have to use a paid service that provides updates for you, which is fairly expensive.

Since my niche and target market is the US and Canada, and because of the complexity of Canada's postal codes and mere size of the database, I decided not to use the postal codes and implement the mileage distance meter on my site, just not worth it.

Fusion Responsive Template & Free Mods
http://www.maverickwebworks.com
DO NOT PM me asking for personal help. Post your problem or request in the forums so the entire community can contribute and benefit.

strawberries90

  • Veteran Member
  • *****
  • Posts: 466
  • Karma: +17/-0
Re: Easier way to add zip codes
« Reply #2 on: January 02, 2008, 10:09:43 AM »
yes, we looked at the whole zip/postal code thing a few months ago.

I'm in the UK, and my post code would help identify my house to one of say 10 homes in a small avenue.  Thus not only would any UK postal code system be massive, and thus probably unmanageable, for our websites....but also I think there would be a major privacy/security issue involved.  I haven't implemented the postal code/milage distance feature on my site.  It isn't something that my server would desire; nor my customers.  I would feel very very uneasy about the pribavcy imvasion.  It just takes one nutter; and then we all (customer, neighbours, dating site) have major problems. No, privacy/security comes first.

The same issue, re post codes, holds true for most western countries.  The USA I believe is different. 

admin2

  • Guest
Re: Easier way to add zip codes
« Reply #3 on: January 02, 2008, 11:31:31 AM »
The zip/postal code search is a resource eater too and I am not a big fan of it but it is there because otherwise Johnboy would say "my main competitor has it and it is mandatory that I have it too" :).
However, I think that for every country there are way too many locations to enter them one by one from an admin interface. This is the kind of job that has to be done with a direct import into the database. If the import file is too large then not even phpmyadmin might not be able to help and it might require a script like our install script to insert it into db.

Johnboy

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 566
  • Karma: +40/-2
Re: Easier way to add zip codes
« Reply #4 on: January 02, 2008, 02:52:39 PM »
SSheesh why pick on me? I have no desire to use the postcode system, even if my main competitor had it. Why would anyone want to search using a postcode, when you can search using towns cities etc. Who can remember postcodes. I think the postcode section is a total waste of coding. Knowing who has looked at your profile is much more handy  :P

PS when I say postcode, it means zipcode here in NZ
I LOVE these forums!!! So helpful...

Atelier

  • Confirmed Member
  • **
  • Posts: 13
  • Karma: +0/-0
Re: Easier way to add zip codes
« Reply #5 on: August 12, 2015, 07:14:32 AM »
I need to add cities for Turkey, we don't have such zip codes like US or UK. Even I put them to database as cvs, I guess it won't be ccombined. Is it possible not to use zip codes?

maverick

  • Administrator
  • Veteran Member
  • *****
  • Posts: 2971
  • Karma: +210/-7
    • Maverick Webworks
Re: Easier way to add zip codes
« Reply #6 on: August 12, 2015, 08:52:13 AM »
No you don't need to include zip codes or the lat and long, these are only required if you want to use the optional search by zip/distance feature.

Fusion Responsive Template & Free Mods
http://www.maverickwebworks.com
DO NOT PM me asking for personal help. Post your problem or request in the forums so the entire community can contribute and benefit.