18 replies [Last post]
RentingjLTD's picture
Offline
Joined: 01/22/2008
Juice: 28
Was this information Helpful?

hi

I installed now the last beta version and it is coming only with 2 countries - US and Canada
and we need the all the setting to be for the UK but still part of the tables must be with all countries

because part of the shop items we can ship to all over the world

where is it possible and how to update the tables

and it is possible to keep the setting for the next time Rentingj LTD will have to create a shop in the UK with the same settings?

Thank you

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Countries table

You can just go to the country settings edit form to add in other countries like the UK.

frost's picture
Offline
Joined: 07/23/2008
Juice: 134
where's Northern Ireland

Hi Ryan,
I don't see the 6 counties of Northern Ireland. Without touching on the political issues, I'll just say that I looked in the Ireland and UK lists and they weren't in either. Do they exist in limbo somewhere else? If not, I will create them - just let me know where I can upload the new country file.

master_phat's picture
Offline
Joined: 08/19/2008
Juice: 103
Re: where's Northern Ireland

I'm no expert but I was just working on something like this. It's called Ireland_372_1.cif in Ubercart/uc_store/countries/

you should just be able to edit that below to include your counties:

  // VALUES = %d for ID, Parent Country ID, Zone Abbreviation, Zone Name
  db_query("INSERT INTO {uc_zones} VALUES "
          ."(%d, 372, 'CARLOW', 'Co. Carlow'),"
          ."(%d, 372, 'CAVAN', 'Co. Cavan'),"
          ."(%d, 372, 'CLARE', 'Co. Clare'),"
          ."(%d, 372, 'CORK', 'Co. Cork'),"
          ."(%d, 372, 'DONEGAL', 'Co. Donegal'),"
          ."(%d, 372, 'DUBLIN', 'Co. Dublin'),"
          ."(%d, 372, 'GALWAY', 'Co. Galway'),"
          ."(%d, 372, 'KERRY', 'Co. Kerry'),"
          ."(%d, 372, 'KILDARE', 'Co. Kildare'),"
          ."(%d, 372, 'KILKENNY', 'Co. Kilkenny'),"
          ."(%d, 372, 'LAOIS', 'Co. Laois'),"
          ."(%d, 372, 'LEITRIM', 'Co. Leitrim'),"
          ."(%d, 372, 'LIMERICK', 'Co. Limerick'),"
          ."(%d, 372, 'LONGFORD', 'Co. Longford'),"
          ."(%d, 372, 'LOUTH', 'Co. Louth'),"
          ."(%d, 372, 'MAYO', 'Co. Mayo'),"
          ."(%d, 372, 'MEATH', 'Co. Meath'),"
          ."(%d, 372, 'MONAGHAN', 'Co. Monaghan'),"
          ."(%d, 372, 'OFFALY', 'Co. Offaly'),"
          ."(%d, 372, 'ROSCOMMON', 'Co. Roscommon'),"
          ."(%d, 372, 'SLIGO', 'Co. Sligo'),"
          ."(%d, 372, 'TIPPERARY', 'Co. Tipperary'),"
          ."(%d, 372, 'WATERFORD', 'Co. Waterford'),"
          ."(%d, 372, 'WESTMEATH', 'Co. Westmeath'),"
          ."(%d, 372, 'WEXFORD', 'Co. Wexford'),"
          ."(%d, 372, 'WICKLOW', 'Co. Wicklow')", uc_get_zone_ids(26));
frost's picture
Offline
Joined: 07/23/2008
Juice: 134
uber-politics

thanks, master_phat, though my question was really just to check I hadn't missed the counties somewhere. Without getting embroiled in the politics of this, the 6 can't go into the Republic of Ireland file because Northern Ireland is something like a country within the UK, although in a different way than Scotland, England or Wales are. Putting them into the UK file isn't exactly right either and would offend people on the other side of the political divide. I just had a look at Amazon.co.uk; they treat Northern Ireland as a separate country, and that's what I suggest we do here.

Ryan, assuming this is an acceptable solution, how do I get a new country code for Northern Ireland and where should I post the new country file once I've created it?

A question remains as to which of the two names we use for one of the 6 counties which is called both "Derry" and "Londonderry" (depending on which foot you kick with). I'm going to call it "Derry/Londonderry" and probably offend both sides Eye-wink

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: uber-politics

I spent a little time with a guy from Ireland over Drupalcon and actually got caught up on the political issues there. I wasn't aware of the state of things in our country import files, of course, but I'm happy to take whatever course you decide on. We have been trying to stick to the ISO-3166-2 specifications for country and zone codes... checking into it on Wikipedia shows that Northern Ireland is actually listed within the UK -

http://en.wikipedia.org/wiki/ISO_3166-2:GB

But I agree, this might not be the best place... so, I'm not sure. Puzzled

frost's picture
Offline
Joined: 07/23/2008
Juice: 134
go with wiki

Ryan
Well if NI is part of the UK as per an ISO standard that's a reasonable justification for putting those counties into the UK file. It needs a little research to find out what the relevent post codes are, I'll have a look around and post a new UK file up if I can find the relevent info.
Mike

PS Who was the Irish person you met?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
It was Jonathan.

It was Jonathan. Smiling

(I actually met a few others, but I'm pretty sure he's the one who gave me the history lesson.)

frost's picture
Offline
Joined: 07/23/2008
Juice: 134
still trying to work this one out

Ok, I started to create a new file, but I can't figure out how to do it to take into account how the UK postal system works. There are overlaps between postal codes and post towns, and I couldn't see how to make that fit into the structure required by Ubercart.

For example, the BELFAST post town has 21 different codes, but each is within the post town called "Belfast". So if I implemented that, I think the user would get a drop down with 21 BELFAST's! This also happens with other post towns though not as much.

This is ignoring the fact that Ubercart expects the UK to use "Counties" which isn't the right term for the UK anyway. Counties exist but they seem to have little to do with the post code system.

Any idea how to work this one out?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: still trying to work this one out

I'm not sure how addresses work in the UK, but it sounds like you might be trying to add a row for each postal code? The would be too cumbersome, obviously, much like trying to list all the Zip codes in the US. Here we use our States, and if there's a corresponding entity for the UK that should be used.

Reference file on Wikipedia: http://en.wikipedia.org/wiki/ISO_3166-2:GB

frost's picture
Offline
Joined: 07/23/2008
Juice: 134
got it, i think

yes, i was confused by something UK post towns, which are not the same as real towns although there is an overlap!
anyway all it really needed was the counties, since the user still has to enter in his postcode anyway
i'm attaching a full file, if i can i'll do a diff at some stage...

AttachmentSize
united_kingdom_826_2.cif 6.86 KB
psynaptic's picture
Offline
Early adopter... addicted to alphas.Not KulvikTheminator
Joined: 08/28/2007
Juice: 731
Re: got it, i think

Cleveland is also missing and probably many more. I saw the post about switching away from Ubercart managed location information and I'm all for that. Zone/Country/State/Postcode always give problems so getting this out of UC would be best.

To get Cleveland added what should I do? Post a bug to the drupal.org issue queue? Edit the .cif myself and post as a patch. What do you need me to do?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: got it, i think

I know this is more than you were looking to do, but if I could get you to weigh in on the following issue with even just a new UK .cif, that would be awesome. I did look, and there is plenty missing. Others have pointed out that Northern Ireland isn't represented at all and should be. I'm going to point all those other threads to this issue so we can get it settled and in for 1.6.

http://drupal.org/node/326836

psynaptic's picture
Offline
Early adopter... addicted to alphas.Not KulvikTheminator
Joined: 08/28/2007
Juice: 731
Re: Re: Re: got it, i think

Hi Ryan, Happy to do this. Shall I use the BS 6879 codes on that page?

psynaptic's picture
Offline
Early adopter... addicted to alphas.Not KulvikTheminator
Joined: 08/28/2007
Juice: 731
Re: Re: Re: Re: got it, i think

Cleveland is not in that reference. There is Redcar & Cleveland but there is also Middlesbrough which I think is really a town/city. It says on the reference that it's a unitary authority so are these supposed to be included?

The funny thing is, we don't even know what county we live in. Postal services don't seem to use county information so I don't think this should be a required field for the UK.

Any thoughts?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Re: got it, i think

Ahh, interesting. Well, if these aren't required for addresses and aren't written on addresses when shipping goods or processing cards, I don't see any reason to require them during checkout. I just went with what was contributed back in the day. Do we know if someone like PayPal cares about this info?

psynaptic's picture
Offline
Early adopter... addicted to alphas.Not KulvikTheminator
Joined: 08/28/2007
Juice: 731
Re: Re: Re: Re: Re: Re: got it, i think

Well, PayPal use a County field on this page:

https://www.paypal.com/uk/cgi-bin/webscr?cmd=_gxo-upgrade&from=resolutio...

Seems to have Cleveland too. My girlfriend works at HSBC and says their systems are very old and have things like Cleveland on when it's not even supposed to exist.

Also, Royal Mail no longer use county and I believe most places ignore it.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Re: Re: Re: got it, i think

Hmm... well I guess the question is whether or not you have to have a county code to make API calls to the standard UK payment gateways. PayPal requires it there, but will the API for WPP process payments without it? If not, I suppose we better get them in. It would also be nice if our system supported subdivisions like that PayPal select list does.

webmayin's picture
Offline
Joined: 01/12/2010
Juice: 7
Re: Re: Re: Re: Re: Re: Re: Re: got it, i think

Northern Ireland Counties are listed alphabetically, in order, as:
County Antrim
County Armagh
.. etc.