not requiring UK postal codes

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
robgrigg
Lieutenant (LT)
Lieutenant (LT)
Posts: 76
Joined: Fri Jun 12, 2009 2:22 am

not requiring UK postal codes

Post by robgrigg » Mon Oct 12, 2009 11:47 am

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.

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: not requiring UK postal codes

Post by Logan Rhodehamel » Mon Oct 12, 2009 1:25 pm

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.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: not requiring UK postal codes

Post by Logan Rhodehamel » Mon Oct 12, 2009 1:27 pm

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.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

robgrigg
Lieutenant (LT)
Lieutenant (LT)
Posts: 76
Joined: Fri Jun 12, 2009 2:22 am

Re: not requiring UK postal codes

Post by robgrigg » Tue Oct 13, 2009 1:34 am

Great, that worked. the UK was coming from the input box on the admin page.

Post Reply