Closed (duplicate)
Project:
Address Field
Version:
7.x-1.0-alpha1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Oct 2010 at 15:30 UTC
Updated:
24 Oct 2011 at 14:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
rszrama commentedHmm, it looks like your patch includes the entire project source. ; )
If you check the project out from CVS and update to HEAD, you can then reapply your modifications and follow the CVS instructions at http://drupal.org/patch/create to generate a diff that just includes your changes against our development version.
Comment #2
balazs.hegedus commentedHi,
here's another patch to add support for UK addresses. I'm doing some research on the recommended address format by Royal Mail, as the included tpl.php is not perfect. As an improvement to the previous one, this patch lists all postal county names in England, Wales, Scotland and Northern Ireland.
Comment #3
balazs.hegedus commentedThought something wasn't right. Here's the same patch for the dev version, hopefully everything is now according to Ryan.
Comment #4
damien tournoud commentedIs there a more defined standard for the key here? If there is, you should use it: store the standardized key in the database, and transform the stored value on display in the template.
Comment #5
balazs.hegedus commentedDamien,
yeah, that did my head in. We don't really have abbreviations for county names in the UK (some counties do have short names, but not all of them), I can imagine we could use something like e-01 for the first one in England, s-01 for Scotland, etc. is that what you meant?
If that's acceptable, I'll create a patch, if not, somebody else may have a better idea.
Comment #6
rszrama commentedIt mostly just matters if your government has accepted standards. We wouldn't want to invent a standard unique to Drupal Commerce. The postal service is often the best place to check for this, and it would certainly be helpful to know for certain if persons who mail packages are required to include this information on an address.
Comment #7
balazs.hegedus commentedRyan,
found what I was looking for, based on Royal Mail's recommendations at http://www.royalmail.com/portal/rm/content1?catId=400044&mediaId=9200078... I'll do another patch later on today.
It's a bit strange that they didn't even mention using county names as most people and [governmental] organisations tend to use them.
Comment #8
rszrama commentedAt the Paris Commerce Sprint, Richard from i-Kos has rolled a version of the template and class that tweaks it according to the link above. Once it gets some review we can close this issue down. Update to the latest CVS HEAD to give it a whirl.
Comment #9
damien tournoud commentedThe
-reloadedbranch has been merged. It comes with reasonable defaults for the UK. Could you please check?Comment #10
Firetracker commentedHI,
Just been having a look at commerce and noticed that the Address fields still aren't quite right:
City -> Town/City
State -> County
Seeing as UK is made up of England, N.Ireland, Scotland and Wales. That field would also be useful.
Lastly a County list would be great as well (much like the states in the US version).
Cheers
Zap
ps - commerce is looking good!
Comment #11
SeriousMatters commentedAccording Royal Mail and Postcomm, county is obsolete and not required for postal purposes. UK counties are used for administrative purposes only. In another words, to say that "I live in Cambridgeshire" officially means "I pay tax to Cambridgeshire council", not "my address is in Cambridgeshire".
Moreover, Royal Mail and Postcomm are considering to drop county information all together next year. It would be silly to work on it now.
Therefore, let's follow Royal Mail's recommendation and change UK county (state) to not required.
reference:
http://www.psc.gov.uk/documents/302.pdf
http://en.wikipedia.org/wiki/Postal_counties_of_the_United_Kingdom
Comment #12
mrpauldriver commentedCounty might not be strictly necessary for postal purposes, but that does not mean that normal humans do not live in them (whether tax payers or not).
And whilst I agree fully that it should be optional, it really doesn't make sense to have the label as 'state'. We don't have states in the UK and I am sure that some clients will insist that this is corrected.
Comment #13
Shadlington commentedI agree with Paul Driver.
Many people in the UK still include counties in addresses.
Additionally, there are use cases for address field outside of providing a postal address in which counties remain relevant.
You may wish to allow users to search for nodes located within a particular county, for example.
Comment #14
Shadlington commentedI suppose this is the more appropriate status.
Comment #15
mrpauldriver commentedI notice also that in the address field form, the postcode appears before the town. This can't be right.
I am sure that quite Royal Mail and other delivery operators would prefer to see the postcode to appear last (after the county).
See also http://drupal.org/node/1188526
Comment #16
Shadlington commentedThat's not what I see - Postal Code is last in my install.
Comment #17
mrpauldriver commentedStrange.
I'm using address field from the commerce kickstart installation profile and it's presented differently.
I notice that Address filed module is Beta 1 and that Beta 2 is now available. I'll do some more checking.
Comment #18
mrpauldriver commentedOK the problem was with Beta 1, Beta 2 is better.
With Beta 2, I would just make the point that the output for City, State and Postcode appears on one line - as screenshot.
They should appear on separate lines really.
Comment #19
Shadlington commentedYeah, that's what I see - and I agree they should be on separate lines.
Comment #20
flortjes commentedOkay, I'm trying to find out how address field get's its information on what format to use for different countries. I don't mind helping out (if I can) but I really don't know where to start.
A couple of points:
City of Glasgow. That's probably because it's an old system and Royal Mail does not use counties anymore.Comment #21
joachim commented> The list of counties in one of the patches is not complete (it would have to include things like City of Glasgow. That's probably because it's an old system and Royal Mail does not use counties anymore.
The problem with counties is: what's a county? Plenty of places in the UK are no longer in any county, because they're in a unitary authority. And then there are places that used to be in one county and are now in another.
If you give a dropdown of current administrative areas, you will get customers complaining that they can't use the 'Historic' county name -- you really will, they write in to newspapers!
(For that matter, the list of counties in the patch contains some which ceased to exist about 20 years ago... ;)
Simplest thing is to remove the county field completely.
Comment #22
flortjes commentedI agree.
I have been hunting a bit around in the source code (not very good with that). In the file
\modules\addressfield\plugins\format\address.incI found this line:// Those countries generally use their administrative division in postal addresses.and then removed
GBfrom the array. Seems to work. I guess I now need to figure out how to submit a patch.However, it still makes me think, how are the individual country formats configured? Is there not away that you can exactly define the items required, the order, whether they should be on a singe line etc?
Comment #23
flortjes commentedBear with my, I said I'm not good with code but I've come up with an attempt to fix this issue. Not sure if I've taken the right approach.
The attached patch should do the following (for UK addresses):
City / town.spantodiv(sorry, totally different issue; applies to all countries)Comment #24
flortjes commentedHold on, the issue for UK addresses seems to be filed twice?
See #1219658: GB Specific Changes
Comment #25
sammyd56 commentedIndeed. Can we mark one as a duplicate and get one of the various patches committed? No UK-facing website is going to want to use this module with 'County' displayed as 'State'...
Comment #26
jdelaune commentedContinue conversation in other thread as #24 says.