Force Uppercase in UK Postcodes
Around half of customers who sign up to our UK webshops are inputting the UK postcode in mixed-case format.
Other UK-based ZC users are probably experiencing the same problem, and customer addresses appear like this:
Joe Bloggs
1 Smith Street
Coventry
Co2 3rl
As per Royal Mail Advice, a UK postcode comprises two elements:
Outbound Code (the first part) EG: CO2
Inbound Code (the second part, after the space) EG: 3RL
Royal Mail sorts and directs mail by using scanners to read the postcode. In order for this to be fast and efficient, the postcode should be properly formatted:
CO2 3RL
If it is not formatted correctly, Royal Mail often has to intervene manually, resulting in postal delays and delivery errors.
Many customers use smart-phones AUTO-FILL features to complete the input fields, and this usually results in the POSTCODE field to be incorrectly formatted. Unfortunately, as people grow increasingly lazy and helpless, trying to educate the online-shopping public in the need to correctly format postcodes, is a futile undertaking.
We are experimenting with a MODIFIED template file (tpl_modules_create_account.php) where we are using an updated bunch of code that was originally written by colinr and fergusmacdonald in 2007 and 2008, for ZC versions 1.3x
This original plugin can be seen at(https://www.zen-cart.com/downloads.php?do=file&id=295)
----------------------------------------------
We are working on UPDATING it for compatibility with:
ZC 1.5.7x
ZC 1.5.8
--------------------------------------------------
When we've tested our modifications, we will post the CODE CHANGES in this thread, with the intention of allowing ZC code experts to determine if our modifications are appropriate - as we have a "novice" level of capability when it comes to writing javascript and php
---------------------------------------------------
Re: Force Uppercase in UK Postcodes
It is also likely that similar code modifications need to be made to files relative to customers UPDATING existing address entries in their "My Account" area.
We think that only one file needs looking at here:
tpl_modules_address_book_details.php
... where similar addition of jscript and line modifications to various input fields' PHP need to be made.
Again... the intention is to make sure that whatever a customer enters (whether at Sign-Up, or Address Editing later on), the postcode will at least be upper-case.