Magento State/Province Option Dropdown for United Kingdom like USA or Germany

Magento State/Province Option Dropdown for United Kingdom like USA or Germany

August 17, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento State/Province Option Dropdown for United Kingdom like USA or Germany

Adding State/Province Dropdown for UK in Magento

As an e-commerce developer, I often encounter requests like yours when working with Magento platforms. Showcasing country-specific state/province options is a common requirement, especially for businesses targeting multiple regions.

In your case, you want to display a dropdown menu of United Kingdom’s states/provinces when the user selects ‘United Kingdom’ as their shipping country. Here’s how we can achieve this:

Step 1: Create or Modify Your State/Province Attribute

First, let’s ensure that Magento has the necessary state/province data for the UK. Navigate to Admin > Catalog > Attributes > Manage Attributes. Find the ‘State’ attribute and check if it contains a value for the UK.

If not, click on Add New Attribute, choose Dropdown as the input type, and add the names of all UK states/provinces (England, Scotland, Wales, etc.). Save this new attribute.

Step 2: Configure Your Shipping Countries

Next, we need to specify that the State dropdown should appear when ‘United Kingdom’ is selected. Go to Admin > Stores > Configuration > General > Country Options.

In the Allow Countries field, ensure that ‘United Kingdom’ (or GB) is present.

Step 3: Configure Your Shipping Address Fields

Finally, we need to tell Magento which shipping fields should display based on the selected country. Go to Admin > Stores > Configuration > Sales > Checkout > Checkout Options.

Under Onepage Checkout, find the Address Fields Reordering section and add ‘Region’ (or State) field after ‘Country’.

Save all your changes.

Step 4: Frontend Development

In some cases, you might need to update template files for proper rendering. The relevant file is usually located at:

app/design/frontend/{package}/{theme}/template/checkout/onepage/billing.phtml

Search for the country_id variable and add conditional logic to display the state dropdown if the selected country matches the UK.

Here’s an example of how you can add this using PHP in your template file:

    <?php if ($this->isCountryGB($countryId)): ?>
        <div class="field">
            <label for="billing:region_id"><?php echo $this->__('State/Province') ?></label>
            <?php echo $this->getRegionSelectHtml() ?>
        </div>
    <?php endif; ?>

The isCountryGB($countryId) function checks if the selected country ID matches that of the UK (2 for GB).

Conclusion

By following these steps, you should now have a functional state/province dropdown menu appearing when users select ‘United Kingdom’ as their shipping destination in your Magento store.

Remember to always test changes thoroughly to ensure they don’t break existing functionality. If you’re struggling with advanced customizations or need further guidance, feel free to reach out to the experts at Laravel Company.

Happy coding!

Checkout Catalog Admin Configuration

Our network