Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 01-12-2009 18:59:23

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

UK - Scotland - Wales - N. Ireland - Eire Postcode Areas

This is another contribution, this time for anyone wanting to have full postal county areas in their webstore(s) for England, Wales, Northern Ireland, Southern Ireland - Eire, Scotland, Isle of Man, and all seven of the Channel Islands (the Isle of Wight comes under the Portsmouth postal area) ...along with a modified list of countries.

Please scroll down the page for the download link.

Last edited by Design_Wholesale (08-15-2010 20:58:08)

Offline

 

#2 01-13-2009 03:23:51

RArch
Member
Registered: 03-10-2008
Posts: 34

Re: UK - Scotland - Wales - N. Ireland - Eire Postcode Areas

Thanks for the additions. I see that you have removed the "Not Applicable" option, theres confidence smile

Anybody who is wondering on how to install these additions use the Export/Import options from Raw Database Admin within Hybrid X Core. Use Export first to make your backup of the gbu0_stateprov table then Import the new file.  This method leaves the "Not Applicable" option in place, you can browse the table afterwards and delete that row if you want.

Offline

 

#3 06-19-2009 17:50:16

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: UK - Scotland - Wales - N. Ireland - Eire Postcode Areas

Thanks for the download and the comments, , - I have made some improvements to the file and included both the country list and the county list for anyone else who wants to download them, seeing as the previous link is broken.


  The updated file, with county addition, can be download through  URI in the form of a .zip file. 


The file checksums are as follows:

(CRC-32) 1A96F93A
(MD5) CABBA4E6ACE58267B25E10BF70B75831
(SHAH1 Hash) 59269ABE618A8EE87584A96BDA33B76E7CB340B0


The following link will allow you to see our guest checkout 'account creation' page in order to better see for yourself what our .csv files will give you in place of the usual selection of counties and countries.

https://litez.co.uk/index.php?app=gbu0& … coactive=1

Importing the .csv files should overwrite existing values, but may just cause some values to be appended instead with, other, existing values left in place.  Therefore it is best to backup your existing  and  tables, then delete the contents of those two tables in your database, and  to import the new tables.

Last edited by Design_Wholesale (11-08-2010 04:33:53)

Offline

 

#4 07-07-2009 02:34:14

gizmobizmo
Member
Registered: 04-14-2008
Posts: 16

Re: UK - Scotland - Wales - N. Ireland - Eire Postcode Areas

Nice job, mate. This helps. We've had a few Channel Islands orders that have had difficulties in the past. In fact we had one last night and customer complained that the address was 'unavailable'.

Nice one.

Last edited by gizmobizmo (07-07-2009 02:34:58)

Offline

 

#5 07-11-2009 20:47:20

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: UK - Scotland - Wales - N. Ireland - Eire Postcode Areas

Thanks, - glad to be able to help.

The use of -- ids in place of blank lines is necessary to avoid breaking the checkout process, so be very careful about messing with these if you decide to implement a similar system in your store.

Also, the Armed Forces lines in the  drop-down box have been left (although, personally, I feel sure that they can be removed unless you know that you have, or are likely to have, customers with US military addresses.

Major update with allot of entries deleted to bring the entire  list into line with Royal Mail postal areas (these vary considerably from the usual county lists, and  include areas specifically for Birmingham, Manchester, etc. - Edinburgh, for example, falls into one of the Lothian postal areas and London, whilst it has its own postal area, has only the one for the  London area).  The Channel Islands, all of which, save Jersey, come under the Guernsey postal area, also remain, but are now listed as Alderney, Brecqhou, Guernsey, Jersey, Jethou, Herm, and Sark  the  prefix (makes for considerably tidier invoices, etc. without the need to mess around with , etc.)

According to , who took the time to check their HSBC CD (thanks!), the code for the Isle of Man (ISO: IM) should be 833 and 830 for the Channel Islands (which seems to apply to all the Channel Islands, JE and GG included).  For everyone else (ie: those not using HSBC merchant banking facilities) the HSBC codes should not be an issue for you.

Eire (Southern Ireland) has been reverted back to Ireland and the full BFPO list has now been added (including the naval assignments BFPO additions), with 655 split for Mount Pleasant Airport, Stanley, Mount Alice, Byron Heights, and South Georgia.

The country list has been updated to remove all instances of , and there is only the  entry for Scotland,  no seperate entries for Scotland Mainland and Scotland Highlands and Islands.  England is also now listed as a seperate entity (my flag is white with a red cross, not some convoluted mix of three seperate countries that does not even have a recognised identifier as far as official country lists are concerned, or even an ISO code for that matter smile ), along with Wales.

As we have killed the  from the original list, you might also want to go into  and find the line that reads

Code:

if ($address['stateprov'] == $spna) {

I could not find where the value for  is given, so (easiest solution) change the line to:

Code:

if ($address['stateprov'] == 'Please Select From The Following:') {

The above modification is simply to suppress the display of  in (usually) the addresses of foreign customers whose state, county, region, or province is not listed in the  drop-down box; although the five regions of Denmark  now in the updated  .csv file... smile


Then, one final modification [] is that of removing a blank box at the top of the drop-down lists.  These are added as a global default, so removing them will affect  drop-down menus (save possibly custom menus of your own design) on your store, unless you use the second method (as given by  in an earlier post of mine on this forum).

(easiest and quickest!):


ClickCartPro (GBU) > Displays: Skins, Menus, XHTML Includes and Messages > Manage XHTML Includes > Formfield: Selection List

then remove the line that reads:

Code:

<option value=""></option>

( method):


Change the option line to read (this one would make the blank line appear in all namespace areas save ):

Code:

<?php if($ns != 'prodshow'){
print '<option value=""></option>';
}
?>

When using a namespace, as shown above, it would also be necessary to declare the $ns variable, which in this case is for the  variable, at the top of the file:

Code:

$ns = $this->globals('khxc.namespace');

Additionally, if you wanted the blank line to show a message, this could be specified by entering the required text between the speechmarks of the , eg:

Code:

<?php if($ns != 'prodshow'){
print '<option value="some text here"></option>';
}
?>

Last edited by Design_Wholesale (08-15-2010 21:39:36)

Offline

 

Board footer