Magento 2 Integration Guide

Integration with Magento 2 address forms made simple

Visit the download pageopen in new window

A step-by-step guide to integration with Magento 2 address forms.

New Plugin

You can now use all of our main products in a single Magento 2 plugin! The new plugin allows you to use Address Auto-Complete, UK Postcode Lookup, Phone Validation, and Email Validation.

If you are still using one of our stand-alone plugins, please follow this guide to switch to the new plugin when you're ready. If you have any questions please contact supportopen in new window.

Preparation

Compatibility

Our current release supports the latest version of Magento (v2.4.x at the time of writing), on both Community and Enterprise Edition.

Download

We recommended using Composeropen in new window to pull our plugin directly into your Magento 2 website, but you can also download it from our websiteopen in new window.

Composer

Require the package

Add the latest version of our plugin with the following command. You may be prompted to enter your Magento 2 access keys - the username is your public key and the password is your private key.

composer require fetchify/module-fetchify

Now sign upopen in new window for a Fetchify account if you haven't already done so, then proceed to installation.

Manual Download

  • Downloadopen in new window our extension.
  • Create this folder structure in your Magento root: /app/code/Fetchify/Fetchify.
  • Upload the contents of the extension (etc, Helper, Model, and so on) into the module-fetchify folder you just created.

Now sign upopen in new window for a Fetchify account if you haven't already done so, then proceed to installation.

Installation

Please note that executing these lines will cause downtime on your Magento store until they finish.

php bin/magento setup:upgrade
php bin/magento setup:di:compile

The plugin should now be successfully installed. Login to your Magento 2 admin area and configure the plugin.

Configuration

First of all, set your access token at Stores > Configuration > Fetchify > Main Settings.

Then decide which product(s) you want to use and make sure they are enabled. Each product has its own dedicated configuration area where you can enable it and set various options.

Stores > Configuration > Fetchify > Address Auto-Complete

Stores > Configuration > Fetchify > UK Postcode Lookup

Stores > Configuration > Fetchify > Phone Validation

Stores > Configuration > Fetchify > Email Validation

After you set your access token and enable some products, you will be able to use them on any standard Magento 2 address form.

Changing County Type

With our Postcode Lookup product, you are able to either disable counties, use former postal counties, or use traditional counties. By default, our Postcode Lookup product uses traditional counties.

You can change this by configuring the County Data configuration option.

This configuration option can be found in Stores > Configuration > Fetchify > UK Postcode Lookup under the Advanced section.

Configuration Options

The configuration for the plugin is located under Stores > Configuration > Fetchify. There are 5 sub-sections with configurations included.

Main Settings

Main Options

Configuration OptionDescription
Enable ExtensionActivate module
Access TokenAccess token

Address Auto-Complete

Address Auto-Complete Options

Configuration OptionDescription
EnableActivate product

Style Settings

Configuration OptionDescription
ModeCurrently only one default mode available
AmbientThe main theme colour of the user interface
AccentThe secondary colour of the user interface

Text Options

Configuration OptionDescription
Search LabelDefault label for the search input field
Search PlaceholderDefault text for the search input field
Placeholder for Country SelectionDefault text for the country selecting step
Change Country button textDefault text for the change country button
No Results MessageMessage if no results can be found
Generic Error MessageDefault error message
Text for Toggle ButtonDefault field revealing text when fields are hidden

Advanced

Configuration OptionDescription
Transliterate for non-ASCII charactersChanges non-Latin characters to Latin characters
Hide Address FieldsHide address fields until address is selected
Lock country selectionChanges the modules country to the one that is currently selected
Set custom ID for the parent element of the search barAdd ID for customisation purposes
Use first address line for searchAddress search uses Address Line 1 instead of a new element
Enable debug toolsEnable debug tools for debugging purposes
Exclude PO BoxesExclude PO Box addresses from search results
Exclude AreasUse predefined options to exclude regions from search resul

UK Postcode Lookup

Postcode Lookup Options

Configuration OptionDescription
EnableActivate product

Search Options

Configuration OptionDescription
Hide Address Fields of New Address EntryHides the address fields until an address is being selected from the dropdown list, or the fields are already populated

Message Options

Configuration OptionDescription
Search LabelDefault label for the search input field
Search PlaceholderDefault text for the search input field
Button TextDefault text for the search button
Text for Manual Entry ButtonText for the reveal fields button
Error Msg #1Default error message if a postcode cannot be found
Error Msg #2Default error message if a postcode is not valid
Error Msg #3Default error message if unable to connect to the address lookup server
Error Msg #4Default error message if an unexpected error occurs

Advanced

Configuration OptionDescription
County DataSelect from traditional county names, postal county names, or an empty county field

Phone Validation

Phone Validation Options

Configuration OptionDescription
EnableActivate product

Email Validation

Email Validation Options

Configuration OptionDescription
EnableActivate product

Questions

  • Do you offer support? Yes, we do offer support during normal business hours in the UK. If you run into any issues, let us know and we will be happy to help.
  • Is this free? The extension is free to download and try, but to use it on a live site you will need a paid account with us.
  • Do I need to sign up for an account to try it? Yes, you’ll need a trial account, at least. You can easily sign up for a free trial account.