US Zip Code Formats NNNNN(-NNNN) - Can Both Be Used?
Maybe your like
- All Activity
- Home
- Community Help and Support
- PrestaShop Download
- Configuring and using PrestaShop
- US Zip Code Formats NNNNN(-NNNN) - Can Both Be Used?
- zip code
- countries
- postal code
- format
By artofadornment May 12, 2013 in Configuring and using PrestaShop
Share More sharing options... Followers 0Recommended Posts
artofadornment
Posted May 12, 2013artofadornment
-
- Members
-
- 102
Is there is a way to enable both USA zip code formats (5-digit and 9-digit) in PS 1.5.3.1?
In the Localization > Countries section in the BO I tried removing the default NNNNN ("No verification if undefined") for the USA hoping that might allow either format, but in testing this in the FO I got an error message telling me "Zip/Postal code is invalid. Must be typed as follows:" (and it was just blank after the "as follows:" text). So that didn't work. It is forcing me to use 5 digits regardless. And of course, changing it to NNNNN-NNNN forces you to use all 9 digits.
I tried to follow along with this post here but they lost me at "overrides", plus the code might not be the same in 1.5 anyway, so I have no idea how to even try that workaround. But from what I can tell, allowing a wildcard (NNNNN*) at least would be ideal, and for UK postal codes as well.
I'm not a developer so I need would some guidance for what files to change, and also what code I would need. Can anyone help with this?
Thanks in advance!
~ Elaine
Link to comment
Share on other sites
More sharing options...- 4 months later...
meccabooks
Posted October 1, 2013meccabooks
-
- Members
-
- 131
Is there is a way to enable both USA zip code formats (5-digit and 9-digit) in PS 1.5.3.1?
In the Localization > Countries section in the BO I tried removing the default NNNNN ("No verification if undefined") for the USA hoping that might allow either format, but in testing this in the FO I got an error message telling me "Zip/Postal code is invalid. Must be typed as follows:" (and it was just blank after the "as follows:" text). So that didn't work. It is forcing me to use 5 digits regardless. And of course, changing it to NNNNN-NNNN forces you to use all 9 digits.
I tried to follow along with this post here but they lost me at "overrides", plus the code might not be the same in 1.5 anyway, so I have no idea how to even try that workaround. But from what I can tell, allowing a wildcard (NNNNN*) at least would be ideal, and for UK postal codes as well.
I'm not a developer so I need would some guidance for what files to change, and also what code I would need. Can anyone help with this?
Thanks in advance!
~ Elaine
Any help in this regard.. customer buying from APO etc can't place order on my website as they are required to enter all 9 digits zipcode
Link to comment
Share on other sites
More sharing options...tuk66
Posted October 1, 2013tuk66
-
- Members
-
- 9.8k
In general, try to override the checkZipCode() function in the Country.php and/or the isZipCodeFormat() one in the Validate.php.
Link to comment
Share on other sites
More sharing options...meccabooks
Posted October 7, 2013meccabooks
-
- Members
-
- 131
In general, try to override the checkZipCode() function in the Country.php and/or the isZipCodeFormat() one in the Validate.php.
Can you please be little bit more detailed, I am not very familiar with the coding
Link to comment
Share on other sites
More sharing options...tuk66
Posted October 8, 2013tuk66
-
- Members
-
- 9.8k
Just an idea. One have to seriously code and debug desired functionality. It is not a case for forum.
Link to comment
Share on other sites
More sharing options...- 9 months later...
artofadornment
Posted July 30, 2014artofadornment
-
- Members
-
- 102
- Author
Bumping my post...
There must be some way to enable both USA zip code formats (5-digit and 9-digit), in PS 1.5.3 or otherwise. Can anyone help?
Link to comment
Share on other sites
More sharing options...- 1 year later...
RabbitZzZ
Posted January 4, 2016RabbitZzZ
-
- Members
-
- 119
Sorry to bump this old thread, but is this somehow possible now in Prestashop 1.6?
Link to comment
Share on other sites
More sharing options...tuk66
Posted January 5, 2016tuk66
-
- Members
-
- 9.8k
Of course, improve some validation methods.
Link to comment
Share on other sites
More sharing options...- 11 months later...
dungeoncrawler
Posted January 3, 2017dungeoncrawler
-
- Members
-
- 28
I'm also looking for answer to this as now that I have deactivated the zip code requirement so that both codes can be used - people aren't entering the zip codes!
Link to comment
Share on other sites
More sharing options...- 6 months later...
dformica2
Posted July 27, 2017dformica2
-
- Members
-
- 18
Bumping this topic.
Is there away to enter 2 formats in the postal code to validate both: NNNNN OR NNNNN-NNNN
Link to comment
Share on other sites
More sharing options...bellini13
Posted July 28, 2017bellini13
-
- Members
-
- 8.4k
There is not a way to do this currently, it has to be developed.
Link to comment
Share on other sites
More sharing options...Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now Share More sharing options... Followers 0 Go to topic listing- All Activity
- Home
- Community Help and Support
- PrestaShop Download
- Configuring and using PrestaShop
- US Zip Code Formats NNNNN(-NNNN) - Can Both Be Used?
- Existing user? Sign In
- Sign Up
-
Browse
- Back
- Forums
- Staff
- Online Users
- Leaderboard
- Code of Conduct
-
Activity
- Back
- All Activity
- Search
-
Go back to prestashop.com
- Back
- Go back to prestashop.com
- Project on GitHub
- Build blog
- Dev Docs
- User Docs
- User Club
- Addons Marketplace
- Create New...
Tag » C-nnnn Postal Code
-
List Of Postal Codes - Wikipedia
-
[PDF] EU Postal Codes, Eircode And Country C - ANA Cargo
-
Slovenia - Postal Code | Post Code | Postcode | ZIP Code ✉️
-
Postal Code, ZIP Code For JAPAN
-
Find Postal Code | Singapore Post
-
Postal Code Formats - Bullseye Locations Knowledge Base
-
[PDF] General Addressing Issues - Universal Postal Union
-
Slovenia Postal Code Lookup - Europacco
-
[XLS] List Of Postal Code Formatting Rules And Regular Expressions Per ...
-
FRANK'S COMPULSIVE GUIDE TO POSTAL ADDRESSES
-
[PDF] Zip Code Boundaries In New Orleans & Surrounding Parishes
-
List Of Postal Codes - SlideShare
-
[PDF] Zip Code Map - City Of Orlando