Magento – Add Northern Ireland, England, Scotland and Wales as State/Province for the United Kingdom

I’ve worked on many projects which needed the customer to fill out which part of the UK they where from. This allowed the administrators to target those customers by region or block sales of a particular products in a region.

By default magento leaves the state/province blank for the UK but you can easily add Northern Ireland, England, Scotland & Wales.

Please note, the following code assumes you havent added fields to these tables (directory_country_region or directory_country_region_name) before. If you have, adjust the id’s in the sql code.

Remember to take a BACKUP of YOUR DATABASE before running these commands!!!

INSERT INTO `directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES
(488, 'GB', 'WLS', 'Wales'),
(487, 'GB', 'SCT', 'Scotland'),
(486, 'GB', 'ENG', 'England'),
(485, 'GB', 'NIR', 'Northern Ireland');
INSERT INTO `directory_country_region_name` (`locale`, `region_id`, `name`) VALUES
('en_US', 488, 'Wales'),
('en_US', 487, 'Scotland'),
('en_US', 486, 'England'),
('en_US', 485, 'Northern Ireland');

Add Default Values to System Configuration Fields

Add the following snippet to your
Namespace/Module/etc/config.xml file.

<?xml version="1.0"?>
                <fieldname>My Default Value</fieldname>         
                <fieldname>My Default Value</fieldname>
                <fieldname>My Default Value</fieldname>

Add Mobile Attribute to Customer Account

The following instructions will add a new customer attribute called Mobile.  This attribute will be added to the Customer information only, it will not be added to the Customer Address.

Apologies for the pastebin links, my syntax highlighter is currently out of action.

Create the following files:


Add the following content to files:


See for content:


See for content:


See for content:


See for content:

Once you have uploaded these files and clear your cache you will notice a new Mobile input field available in the customer admin section (Customers/Manage Customers/Click Customer/Click Account Information).

Screen Shot 2015-01-21 at 16.00.50

Mobile Number is now added to the customer account.

 Adding Mobile to Customer Account Edit Form.

Create/Edit: app/design/frontend/yourpackage/yourtheme/template/customer/form/edit.phtml

See for Content:

Insert  the above code around line 46 before  <?php $_dob = $this->getLayout()->createBlock(‘customer/widget_dob’) ?>

Screen Shot 2015-01-21 at 16.20.23

 Adding Mobile to Customer Registration form.

Create/Edit: app/design/frontend/yourpackage/yourtheme/template/persistent/customer/form/register.phtml

See for Content:

Insert  the above code around line 57 before  <?php $_dob = $this->getLayout()->createBlock(‘customer/widget_dob’) ?>

Screen Shot 2015-01-21 at 16.28.18

You and your customers should now be able to add/edit their mobile number.

Please note this has only been tested on Magento

Starting AngularJS


Recently I have been reading up on AngularJS and I have to say I love it. As the title says I am only starting out on AngularJS but I plan to put some tutorials and other findings here in the coming weeks/months 🙂

If anyone else is interested in starting AngularJS, I would highly recommend watching these lessions on (  They’re short but very informative.

Also, you can find a wide range of resources on AngularJS here.

Add a Custom CMS Layout Template in Magento

To add a custom template to Magento is quite simple. Please find simple instructions below:

1. Create a new module

Create the following folder path


Create a file called config.xml in app/code/local/PaulDonnelly/NewTemplates/etc/

Add the following snippet to config.xml

<?xml version=”1.0″?>
<label>Name of your Template e.g. Standard CMS Page (One Column Left)</label>

2. Create the Template File

Create a file called standard-onecol-left.phtml in


You will most likely be using an existing template as a starting point. Just copy the contents from 1column.phtml, 2column-left.phtml, 2columns-right.phtml or 3columns.phtml into standard-onecol-left.phtml. In our example we will be copying the contents of 2column-left.phtml.

3. Activate your new module and CMS Layout

Create a file called PaulDonnelly_NewTemplates.xml in app/etc/modules/

Add the following snippet

<?xml version=”1.0″?>

Upload your new module and you will see a new CMS page listed.

Add a Custom CMS Layout Template in Magento

My Top ‘Must Have’ Extensions When Beginning a New Magento Website.

When beginning any magento website, I always have a small list of extensions at hand that I trust and enhance my magento stores. Please find a few listed below.

For Product Image Zoom:

Magic Zoom Plus by MagicToolbox (£45)

For Navigation:

MegaMenu for Magento by TheExtensionLab (£149.99)


ProNav by Brandammo ($69.99)

ProCategory by Brandammo ($99.99)

Improved Layered Navigation by Amasty ($139)

For Enhanced Checkout:

Light Checkout by GoMage ($169.00)

For Shipping Rules:

Premium Matrix Rate by WebShopApps (£50.00)

Or for those on a budget

Matrix Rate by WebShopApps (FREE)

For Payments:

Sage Pay Suite Pro (Europe) by Ebizmarts (£169)

For Blogging:

Magento WordPress Integration by Fishpig (FREE or Paid Installation)

Core Enhancements

Remove any link from My Account navigation by Paul Donnelly [Shameless Plug but it’s always needed] (FREE).

H&O Handles (FREE)