artofadornment Posted May 12, 2013 Share Posted May 12, 2013 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...
meccabooks Posted October 1, 2013 Share Posted October 1, 2013 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, 2013 Share Posted October 1, 2013 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, 2013 Share Posted October 7, 2013 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, 2013 Share Posted October 8, 2013 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...
artofadornment Posted July 30, 2014 Author Share Posted July 30, 2014 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...
RabbitZzZ Posted January 4, 2016 Share Posted January 4, 2016 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, 2016 Share Posted January 5, 2016 Of course, improve some validation methods. Link to comment Share on other sites More sharing options...
dungeoncrawler Posted January 3, 2017 Share Posted January 3, 2017 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...
dformica2 Posted July 27, 2017 Share Posted July 27, 2017 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, 2017 Share Posted July 28, 2017 There is not a way to do this currently, it has to be developed. Link to comment Share on other sites More sharing options...
Recommended Posts
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