How to implement a store locator

Step 1: Setting up the store locator service

All of our services require 'keys' on your account in order to work. You can set up a key for any of our services in your account by clicking on the 'Add service' button at the top of the account section. Choose 'Store Finder' to get started.

Setup New Service

Your key will be created for you and you can now edit its settings (such as name, daily limit and security restrictions), or just get started with adding a store finder to your site.

Step 2: Inserting the code

The "Get Started" tab will show some JavaScript, so just click the 'Copy' button next to the code to pick this up, then paste it into your page where you would like the button to appear, usually next to your postcode field.

 

<form method=post>
   <table>
        <tr>
             <td>Postcode</td>
             <td>
             <input type="text" name="postcode" size="10">
             <SCRIPT LANGUAGE=JAVASCRIPT SRC="http://services.postcodeanywhere.co.uk/form.aspx?account_code=AAAAA11111&license_key=AA11-AA11-AA11-AA11"></SCRIPT><SCRIPT LANGUAGE=JAVASCRIPT> postcode_anywhere_address(); </SCRIPT>
             </td>
        </tr>
   </table>
</form>

When you load your page, you should see a 'Setup PostcodeAnywhere' button. Click this to bind the Store Finder to your form. After entering your password you will be asked for the name of the postcode field. Select the appropriate field from the dropdown, click 'Next', and that's it - the integration is done!

Step 3: Your location list

You've now got the bare bones of a Store Finder on your site, so all we need is a list of all your stores. Click the 'Add Service' button again, and this time choose 'Location List'.

First, choose a meaningful name for your location list, then set the geographic coverage (UK only or international). Finally, decide whether you want the list to be prepaid (pay as you upload locations, then searches cost the same regardless of the number of locations returned) or normal (free to upload with a charge per location result returned from a search).

Location lists: The anatomy

Each location in your list has four components:

  • Postcode
  • ID (to uniquely identify the item)
  • Name (for your reference)
  • Description (to display in the window - this may contain contact information, opening hours, and even HTML tags for formatting)

Uploading method 1: CSV

You can upload your locations as CSV file. The file must have four columns: 'Postcode', 'Unique ID', 'Name' and 'Description'.

Uploading method 2: single items

The final option is to upload your items individually. Just fill in the form appropriately and click 'Add location'.

Step 4: Assigning a location list

All you need to do now is assign the location list to your Store Finder key, and you'll have a working store finder.

Back in your Store Finder key settings, click 'Location List', choose your new list from the dropdown menu and click 'Save'.

Extra settings

While we're here, why not take a look at the extra settings for your Store Finder? It's a good idea to add some URL Restrictions, activate the IP Limiter, or adjust your Daily Limit for extra security.