BigCommerce Integration for UK Address Search and Validation
Updated 26 Mar 2021
Ideal Postcodes provides a BigCommerce integration that facilitates UK address search and validation across a BigCommerce Store.
This extension is free to download and install. However, our address validation services require a paid account at ideal-postcodes.co.uk.
This integration works by hooking into BigCommerce's custom HTML field. It waits until a valid address form is present before binding itself.
Contact us if you get stuck. Drop by our developer chat page for in-depth assistance.
If you need support, you can either reach out to us on our support page or drop by our developer chat page.
We recommend installing our plugin via both the Script Manager and Site Verification Tags.
Script Manager is the official method to customise your checkout. This allows address validation on your checkout and will be supported by BigCommerce indefinitely.
The Site Verification Tag install will provide further address validation on your account registration and user address book pages. This is currently the only way to add global scripts to your BigCommerce site.
In the Script Manager and Verification Tag install you will the script below with some amendments.
<script>
window.idpcConfig = {
apiKey: "Your API Key goes here"
};
</script>
<script
async
type="text/javascript"
crossorigin="anonymous"
src="https://cdn.jsdelivr.net/npm/@ideal-postcodes/bigcommerce@3">
</script>
You will need to replace apiKey
attribute in the first script tag. This should be replaced with the Key on your account
Advanced Settings
tab from your dashboard.Site Verification Tags
checkbox in the Analytics
page (under the General Settings
tab).
Analytics
page, under the Site Verification Tags
tab, insert the script from our script setup step and click on Save. The page should appear like below:
Store Front
and then Script Manager
.Create a Script
button.Create Script
page, name your script. Select the following options:
Footer
as the location on pageCheckout
as the page on which the script will be addedEssential
as the script categoryScript
as the script type
Script contents
editor and click on 'Save'. The page should appear like below:
Your first key on your Ideal Postcodes account will carry a free test balance which you can use to verify and test your integration. Please contact support if you need a larger test balance.
In order to go live, you will need to purchase a balance of lookups on your API Key. This can be done manually or automated from your dashboard. Each address search consumes one lookup from your key balance.
See our account setup guide for the quickest way to go live by creating your first API Key and enabling automated top-ups.
The minimum configuration is as follows:
<script>
window.idpcConfig = {
apiKey: "Your API Key goes here"
};
</script>
See our integration configuration guide to understand how to customise this.
The available configuration attributes for the configuration are as follows:
window.idpcConfig = {
// API Key is not set by default
apiKey: "",
// Postcode Lookup is enabled
postcodeLookup: true,
// Autocomplete is enabled
autocomplete: true,
// Company name field is updated
populateOrganisation: true,
// County name field is not updated
populateCounty: false,
// Advanced configuration
autocompleteOverride: {},
postcodeLookupOverride: {}
};
This integration will be continually updated without your action. However there will be occassion when a backwards breaking change is introduced. When this happens we will increment the version number at the end of the script src
.
It's possible to fix the version number of the integration script. The version suffix @VERSION
in src
can be replaced with a specific version number. Versions are automatically logged and tracked on our Changelog.
Your API Key is central to how our service recognises your integration. See our guide on API Keys to find out more.
API Keys can also be safeguarded against potential misuse, please see our guide on securing your API Key to find out more.