PrestaShop Plugin How-To
Our plugin for PrestaShop supports the following features:
- PredictiveAddress
- Phone Validation
- Email Validation
- Unusable Name Validation
PrestaShop Plugin
Our plugin for PrestaShop supports the following features:
- PredictiveAddress
- International Telephone Validation
- Email Validation
- Unusable Name Validation
PrestaShop Plugin Compatibility
Our PrestaShop plugin applies real-time validation to forms across your site.
The following versions have been tested for compatibility:
PrestaShop |
---|
1.6.1.23 |
1.7.5.1 |
1.7.6.5 |
1.7.7.1 |
1.7.7.3 |
Installation
To install the Data8 PrestaShop plugin on your site, download the module from the PrestaShop marketplace. From the admin area of your store, go to Modules > Module Manager and click 'Upload a module'. Select the file you downloaded from the marketplace and wait for the plugin to install. Once it is installed, a 'Configure' button should appear that will take you do the Data8 plugin settings page where you can set up the validation to suit your needs.
Should you ever wish to uninstall the Data8 Magento Plugin from your site, go to 'Modules' > 'Module Manager' and find the Data8 plugin. On the right side of the row, there is a drop down arrow which contains options to disable or uninstall the plugin.
Configuration
From the Data8 settings page (Modules > Module Manager > Data8 Data Capture & Validation > Configure) you can enable and choose the validation options that suit your needs.
On the configuration screen, enter your API key found on your Data8 Dashboard. Each validation service requires the necessary credits to function.
PredictiveAddress ///what3words integration
You can search for any 3 word address by simply typing out the three words like so "pitch.tells.civil".
If you wish to store the 3 word address that was used to retrieve the final address, add the class data8_what3words
to an input field to indicate where we should store the what3words address.
Usage
After entering your configuration details and clicking save, the relevant enhanced data capture and validation will be applied to various data entry points around your site, including:
- Checkout
- Creating a new account
- Editing account information
- Adding/editing address book entries
Validation can also be applied to custom forms or fields. The following rules can be used to attach Data8 Validation to acceptable fields:
- Email: Either a field name attribute containing
email
or a text input of typeemail
. - Telephone: Either a field name attribute containing
phone
or a text input of typetel
. - Name: A field name attribute containing
name
(excludingusername
andcompany name
). - Address (PredictiveAddress): An easy way to implement PredictiveAddress into a custom form is to use the address field id’s off a default form that implements PredictiveAddress, e.g. the Customer Account > Add Address form. For example, the company and address line 1 ID's should be
company
andaddress1
respectively.
PredictiveAddress
When PredictiveAddress is enabled, any suitable address entry section on your forms will have use of our address autocomplete and verification tool. Simply begin typing an address/postcode/company name into the Address line 1 or company box to start searching and narrowing down results.
Validation
If entered data is identified as invalid, the error will be highlighted suitably on the form.
When Telephone Validation is enabled, all suitable telephone number fields are validated automatically. There is also another option available to you for further control of validation: Default Country Code.
Option | Description |
---|---|
Default Country Code | The ISO 2-character country code or international dialling code of the country to validate the telephone number in, unless that number contains an explicit country code prefix. |
When Email Validation is enabled, all suitable email address fields are validated automatically. The level of validation to apply to entered email addresses can be selected from a drop down on the settings page. See the table below for information on each level.
Email Validation Levels:
Level | Description |
---|---|
Syntax | The supplied email is checked to ensure that it meets the standard email address format. This is the quickest option and would reject such incorrect email addresses as "noone@nowhere" and "N/A", but would accept incorrect email addresses that are correctly formed but that do not include a valid domain name such as "noone@data-9.com". |
Domain | The supplied email is checked to ensure that the domain name (the part to the right of the @ sign) exists and is set up to receive email. This is still normally very quick, but can take a few seconds in some cases. This check would reject incorrectly formatted email addresses in the same way as the Syntax check, and would also reject a misspelled domain name such as "noone@data-9.com". It can also detect when a domain name exists but does not handle email, such as "noone@example.com". It does not verify that the part of the email address to the left of the @ sign exists. |
Server | In addition to the Domain level checks, validates that at least one of the mail servers advertised for the domain is actually live. |
Address | In addition to the Server level checks, validates that the mail server accepts mail for the full email address. |
When Name Validation is enabled, all suitable name fields are validated automatically.