[ic] Error Messages:

Jonathan Clark interchange-users@lists.akopia.com
Tue Jul 10 06:44:01 2001


> I wanted to change the locale to appear to be in the UK.  I have tried
> several unsuccesful methods, the biggest problem being with the error
> messages on the checkout page.

default locale should be en_GB, with appropriate settings in locale.txt for
price formatting etc.


> What I have done, with a degree of success, (and what has seemed to be the
> best option so far) is changed the US Label from "United States"
> to "United
> Kingdom", removed the option to be able to choose "Canada" or "Other", and
> got the Checkout to look up UK Counties instead of US States.

You can alto use a ValuesDefault directive in catalog.cfg to uk:

ValuesDefault    country           UK

> This works
> extremely well apart from the error message system, which will
> not accept a
> UK Postcode: The error message indicating that the postcode
> entered is not a
> valid US or Canada Code, and in that, it is correct.
>
> Someone told me where to look to change the format of the postcode, but,

yep, that was me.

> given the method by which I have to modify IC - and my limited
> knowledge of
> how the program works, I simply didn't understand what I was being told.
>
> Is there a simple manner in which I can modify IC to accept a
> different type
> of postcode (zip) whilst thinking it is still in the US? (UK
> postcodes look
> like this: (eg) BD22 5HU, or W1 5ES).  Or alternatively, just
> have the error
> checker see at least the first 2 or 3 characters of the postcode field to
> accept it?

simple way was as I described, it performes no validation though... you do
need the country to be non US / CA for it to work. see etc/profiles.order:

[if value country =~ /^(US|CA)$/i]
	state=state_province "[value state]" is not a valid US/Canada state or
province.
	zip=postcode "[value zip]" is not a valid US/Canada postal code.
	&or phone_day=phone, phone_night=phone Must have alternative or day
phone_number
[else]
	&or phone_day=phone, phone_night=phone Must have alternative or day
phone_number
[/else]
[/if]

you are being caught out by this since country='US'

I just looked and I actually use 'word' filter:

<INPUT TYPE=text NAME=zip VALUE="[value name=zip filter=word]" size=10>

good luck!

Jonathan.