Friday, June 24, 2011

Using Postcodes in BlueBox2.0 via PostCodeAnywhere

Recently we have integrated an excellent UK postcodes library/database/service with BlueBox2.0. This is the PostCodeAnywhere product. The API's have been integrated formally into BlueBox2.0 and offer the following features:
  • Postcode Lookup
  • Find nearest-to from a certain address (used for finding 'a store near you' etc)
  • Geo-spatial data (long/lat data for mapping)
  • Government Data (wards/districts etc)
  • Database Cleansing
Installing PostCode Lookups into BlueBox2.0

This is a very easy process. Simply go to toe Postcode Module under Integration. There you will be asked for your PostcodeAnywhere customer 'code' and the API Key for your lookup-account with them. These are easily got by surfing to PostcodeAnywhere.co.uk using this link:

Postcode Anywhere

Sign up for an account, then create a new key from the backoffice menu. Once you have your account and key simply enter these into the PostCode module by clicking on Accounts in the top menu. Click on 'DataFunctions->Add' and fill in your account details.

Once these have been filled in and the account is added, go back to the Postcodes Dashboard and you will see a test lookup facility which you can use to test if the account is working correctly.

Configuring your BlueBox2.0 System for Postcode Use

Now that Postcodes have been set up in your system, you may want to configure it as follows:

Limiting abuse: BB2.0 has a default limit of 3 lookups per IP address per hour, to stop web-users from chewing up your credits unnecessarily. This would apply for 'public use', but if you have a backoffice function you may want to set this to a much higher amount, or remove the limit altogether. There is a bbsetting for this, called bbsetting_postcode_limit_per_hour. If you set this to 0, there will be no limit.

Forcing Postcode Lookups: The postcode module will not automatically 'hijack' fields with the name containing 'zipcode', but if you want all 'zipcode' formfields to automatically become postcode lookups, you can set bbsetting_postcode_force_lookups_in_forms to 1.

Disabiling Postal Address fields for manual entry: Part of postcode lookup functionality is to stop users from messing up the data. To make your address fields 'readonly' use bbsetting_readonly_fields for each module that has postal address fields. Ie for the user table you will set bb_users->bbsetting_readonly_fields to be:

postal_address,
postal_address2,
postal_suburb,
postal_city,
postal_state,

No comments:

Post a Comment