Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to have auto generated Zip Codes #25

Open
bahiirwa opened this issue Sep 26, 2019 · 9 comments
Open

Ability to have auto generated Zip Codes #25

bahiirwa opened this issue Sep 26, 2019 · 9 comments
Labels
Feature Request New feature that users would like in the project. Needs PR Issue to be fixed. Needs a PR.
Milestone

Comments

@bahiirwa
Copy link
Collaborator

Having auto complete options for state are well done but issue is that there are no auto generated zip codes to match the state on signing up the shop. See image below

Screen Shot 2019-09-26 at 20 47 14

It would be very nice to have zip codes generated on input of states just like country currencies codes are input on adding the country.

@bahiirwa bahiirwa added enhancement New feature or request help wanted Extra attention is needed labels Sep 26, 2019
@ghost
Copy link

ghost commented Oct 5, 2019

Zipcodes/postcodes aren't always that easy. For example, in England the same town can have numerous codes depending on which part of the town they are in. Or do you mean have a drop down box with all the options?

@bahiirwa
Copy link
Collaborator Author

bahiirwa commented Oct 5, 2019

I mean a dropdown with options. Countries with one zip code like Uganda would have that auto-filled in so save some time and errors for shop owner.

@bahiirwa bahiirwa added this to the Version 1.1.0 milestone Nov 12, 2019
@viktorix
Copy link
Member

I just wanted to say this is a bad idea for the US. Most larger cities have multiple zip codes. In New York City, for example, there are multiple boroughs (Brooklyn, Queens, Bronx, etc.). Each one has dozens of zip codes. So if I enter Brooklyn, NY there would be 47 zip codes to choose from. That's a long list of numbers. Not good for UX.

The goal is to make this easier and pre-fill info if possible for the user. What we've done instead is to ask for zip code first, then use Google Maps API to get city/state/country and pre-fill those fields. So instead of pre-filling 1 field, we pre-fill 3 fields for the user. Saves more time. They can also edit those fields in case we got it wrong. Here's an example:

1ace14c2-4c2d-4fee-984d-dea218174c7c

We probably can't use Google Maps API, so we need to find a zip code database/API to use.

@bahiirwa
Copy link
Collaborator Author

This is good feedback. I come from a continent where we have one zip for a whole country.

We probably can't use Google Maps API, so we need to find a zip code database/API to use.

CC has its own hard coded location information in files. I guess this is to remove the requirement for a internet link if one is setting up offline and also to check for errors in location. Is there a way we can leverage this to achieve the above?

@viktorix
Copy link
Member

viktorix commented Nov 23, 2019 via email

@bahiirwa
Copy link
Collaborator Author

Check the https://github.com/ClassicPress-research/classic-commerce/tree/develop/i18n folder. All files are in there

@ghost
Copy link

ghost commented Nov 23, 2019

I really wouldn't waste too much time on this. It seems to me to be a feature that sounds nice but is not important at this stage and will be very difficult to implement. As I mentioned above, England postcodes define a small area, virtually a few blocks of streets. Small cities can have many hundreds of them. It's not that hard to type in your own postcode.

@viktorix
Copy link
Member

I agree it should be postponed until later version once we figure out what's the best approach.

The i18n stuff is the basic stuff that's already being used, so there's nothing extra in there to do what we're discussing here.

One additional alternative is to use IP location to detect the country and city. There are free databases that can be bundled with CC to do this. It's not very accurate, but can be helpful.

@bahiirwa
Copy link
Collaborator Author

This is an enhancement for a future release. Please check #102 for what’s urgent.

@bahiirwa bahiirwa added Feature Request New feature that users would like in the project. Needs PR Issue to be fixed. Needs a PR. and removed enhancement New feature or request help wanted Extra attention is needed labels Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature that users would like in the project. Needs PR Issue to be fixed. Needs a PR.
Projects
None yet
Development

No branches or pull requests

2 participants