naizfit.json
The Naiz Fit SizeForm widget configuration can be done through a JSON file stored in the root of your domain. The file must be named "naizfit.json"
Configuration install and update
Once you have allocated the naizfit.json file in the root of your domain, you can use the following URL to determine the install or update of your configuration:
http://backend.production.naiz.fit/api/partners/config/dominio/partnerKey
Important
You eill have to substitute the "domain" element from the URL for your complete domain (ex: www.example.com) and the "partnerKey" element for the key por la clave provided by Niaz Fit.
The system will check the existance of the naizfit.json file in the root of your domain, will analyze the structure and will update its configuration.
Structure of naizfit.json file
In the following chart you will find the details of every field that define the configuration of the Naiz Fit SizeForm widget for your domain.
Field | Default value | Description |
---|---|---|
version | 2.0.0 | Version of the NaizJS JavaScript library included in the personalized package for the domain that is loaded in. |
enabled | true | Allows to enable (true) or desable (false) the form render and the widget opener button render. |
openerSelector | [data-naiz-opener] | Selector CSS to find the DOM element where the widget opener button must be inserted. |
formContainerSelector | body | Selector CSS to find the DOM element where the widget form container must be inserted. |
custom/script | File URL with the JavaScript code that will be packaged with the NaizJS library and that enables the customization of the behaviour of the Naiz Fit SizeForm widget. | |
custom/html | File URL with the HTML code for the user interface customization. | |
order_regex | Regular expression that allows to identify the purchase confirmation page through its URL. This functionality can also be defined overriding the method "checkOrderPage", as it is described throughout the personalización del comportamiento section. | |
mode | SELECTOR | Defines the way in which the widget will be rendered.
|
naizfit.json example
{
'version': '2.0.0',
'custom': {
'script': 'https://my.domain.com/scripts/naizfit.js',
'html': 'https:/my.domain.com/htmls/naizfit.hbs'
},
'order_regex': '*_order.*'
}