All tutorials

Installing the what3words OpenCart Extension

easy

The OpenCart Extension enables you to add a field to your checkout page that can accept 3 word addresses and provide autosuggest results as a user types.

The extension can be used in all versions of OpenCart 3.

You will need a what3words API key to complete this tutorial.

2

Installation

Download the OpenCart extension here.

Upload the file to your store within the OpenCart admin portal using the Extension Installer.

3

Enable plugin

Once installed, go to the admin panel section Extensions -> Extensions, and from the drop-down select “Modules”, where you should see the “what3words” extension appear. Enable the module and add your what3words API Key for the field to appear on your checkout page. Without the key, the box will appear but no suggestions will be returned or validated.

Finally, check the box has appeared on your checkout and is returning suggestions for input.

Additional settings

If you need to capture the coordinates for a three word address to help with delivery information, for example, you should check the Save coordinates checkbox.

The coordinates will added to your order and visible in your Sales page on Opencart.

Note this uses an additional what3words API call to convert the what3words address to coordinates. Please ensure the tier you have signed up to covers the amount of usage you intend to do to avoid interruption of service.

If you need to capture the nearest place information for a three word address to help with delivery information, for example, you should check the Save nearest place checkbox.

The nearest place info will added to your order and visible in your Sales page on Opencart.

You can override the default placeholder for the address field(s) by selecting this option and specifying the placeholder text. We recommed you use the default placeholder value as it provides your customers with an example of how to use the what3words Address Field.

We provide a number of options for clipping the autosuggest results, limiting the addresses that can be validated and captured. You can clip suggestions to a number of countries by providing comma separated 2 digit ISO codes for each country you wish to clip to. This will ensure suggestions provided are clipped within the countries specified. You can also clip within a circle, a bounding box or a polygon.

N.B. – When providing multiple clippings the intersection of each polygon is what forms the suggestions provided when using the what3words Address Field.

For most checkouts we recommend skipping these options as the clip to country is automatically set when a user selects a country for their billing and/or shipping information as they select a country from the dropdown menu options in the checkout form.

Related tutorials

Back to top