Any ideas on implementing a city/state combination check before order submission? Client has a few orders with cities and zip codes that don't exist in the state they submitted. Example: Atlanta, NY, 30346.

My first step was to ensure that all fields were clearly labeled and conspicuous.

Unfortunately an order came in last week with a city/state mismatch. It may have something to do with my client's userbase.

Any ideas? Pretty sure it will involve an extension using the store_order_submit_start hook and a rather large database, but that's all I have right now.

Appreciate any help.

Thanks, Bobby


You would need to either write an extension as you have suggested or there are some javascript libraries available too. In the past I have used am API called Ziptastic which requires that the user enters their zip code then it will find the matching city/state/country for the particular address. The times that I have used it the only required shipping requirements were in the US so I can not speak for how it works for international shipping but it is a start instead of trying to manage your own DB of addresses.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.