Page 1 of 1

not requiring UK postal codes

Posted: Mon Oct 12, 2009 11:47 am
by robgrigg
Hi,

on the one page checkout there some code which checks if the counrty requires a post code.

Code: Select all

        //SEE WHETHER POSTAL CODE IS REQUIRED
        string[] countries = Store.GetCachedSettings().PostalCodeCountries.Split(",".ToCharArray());
        PostalCodeValidator.Enabled = (Array.IndexOf(countries, countryCode) > -1);
This code has an issue which might be due to some configuration i have made.

The country code for the uk is GB, however it seems to be comparing it against a string of "UK"

any help greatly appreciated.

Thanks.

rob.

Re: not requiring UK postal codes

Posted: Mon Oct 12, 2009 1:25 pm
by Logan Rhodehamel
Go to Configure -> Stores in the merchant admin menu. There you can adjust the listed country codes that will trigger postal code requirements. Just to be safe, put GB and UK both in the list.

Re: not requiring UK postal codes

Posted: Mon Oct 12, 2009 1:27 pm
by Logan Rhodehamel
I checked and our default country data uses GB as the country code for United Kingdom. I'm not sure where UK is coming into your equation... but try the solution above and see if it solves the issue.

Re: not requiring UK postal codes

Posted: Tue Oct 13, 2009 1:34 am
by robgrigg
Great, that worked. the UK was coming from the input box on the admin page.