This is straight from the DC Paris site.
My order review page shows my address as:

Address:
MY NAME
101 MY STREET
TOWN, ERYS XX1 1XX
UNITED KINGDOM

As an ordinary member of the public, I'm saying "What the heck is this ERYS crap in my address and how do I get it out?"

CommentFileSizeAuthor
#4 ubercart_uk_addresses.patch792 bytesjoachim

Comments

cha0s’s picture

Is this actually an Ubercart issue, or just the way the DrupalCon page is handling it?

joachim’s picture

A site like Drupalcon has to handle orders from all countries, and some countries like the USA need to show that code. So I'd say it's up to the address creation stuff to be clever and know for which countries it's relevant and which not.

Island Usurper’s picture

The address formatter is clever enough to know not to output the unneeded address data. The problem is that the people who contributed the country files that Ubercart uses didn't pay enough attention to the address formats.

For example, the current address format for the United Kingdom is

!company
!first_name !last_name
!street1
!street2
!city, !zone_code !postal_code
!country_name_if

which is the same as the United State's address format and the default value. (!country_name_if only displays the country name if it is different from the store address's country.)

Since this obviously isn't right, we need a patch to the united_kingdom_826_1.cif file to fix it (I'll take care of renaming it to united_kingdom_826_2.cif since it's a new version).

joachim’s picture

Status: Active » Needs review
StatusFileSize
new792 bytes

Ah... in which case, hats off to Ubercart!

Clearly, that address format hasn't been changed from the US default -- the comma in "!city, !zone_code" is a giveaway also.
Here's a patch:
- removing the zone code
- putting a line break between city and postcode.

Island Usurper’s picture

Status: Needs review » Fixed

Thanks a lot. Committed.

longwave’s picture

Status: Fixed » Needs work

Zone name should be used in UK addresses instead of zone code. I posted a v2 of the UK country file at http://drupal.org/node/326836#comment-1583500 including updates to a number of zone names that were missing in v1, but so far it seems to have been overlooked :(

joachim’s picture

I thought that one was in already! At least, I saw East Riding of Yorkshire in the Drupalcon dropdown!

I'd go for omitting the county -- it's not a formal part of a UK address. If we could make input of the zone non-required too that would be even better. Having to scroll through that dropdown for my county was a pain.

longwave’s picture

East Riding of Yorkshire was already in the country file. The whole of Northern Ireland, plus Avon, Cleveland and Middlesex are still missing from the Drupalcon Paris site.

Zone can be made optional in the UI but this affects all countries, so for a lot of non-UK sites it will probably be set to required. Required address fields should probably be made country-specific rather than site-wide, but I guess that won't happen now until UC3.

Island Usurper’s picture

Status: Needs work » Fixed

I'm not sure how we can get the zone field to be required for some countries and not for others. I agree that it probably won't happen until UC3. Sorry about not dealing with the other issue about the zone list, but I'll merge it in as well. There hasn't been a release since this patch was committed, so it should be fine to keep calling it version 2.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.