For successful integration of this button, you need to add several lines of JS-code to the place, where you would like to display the button. The minimum amount of integration code is:
<script class="wizart__floating-button" data-token="token" src="https://wizart-files.fra1.digitaloceanspaces.com/production/integration/floating-button.min.js"></script>
Floating button maintains the following parameters:
<script class="wizart__floating-button" data-title="Custom button title" data-token="token" data-vendor_code="" data-article_query="" data-parameters="" data-background="" data-color="" data-image="" data-tooltip_title="" data-tooltip_position="" data-tooltip_disable="" data-glitter_disable="" data-width="" data-height="" data-border="" data-border_radius="" data-class_name="" data-compact="" src="https://wizart-files.fra1.digitaloceanspaces.com/production/integration/floating-button.min.js" ></script>
Parameter | Description | Type |
---|---|---|
class | Required parameter. | required |
src | Link to js-file with integration code. | required |
data-token | api token - generated and issued by Wizart Administrator. | required |
data-title | Text to be displayed on the button (the default value is "Try it in your room in one click!"). | optional |
data-vendor_code | Unique SKU ID of the product uploaded to Wizart system. | optional |
data-article_query | Required in the case if parameter data-vendor_code is not enough for product search in the Wizart system. Parameter value should be a result of the function | optional |
data-background | Button background | optional |
data-color | Button text color | optional |
data-tooltip_disable | If the value is “true”, the tooltip will not be displayed. | optional |
data-tooltip_title | Text to be displayed on the tooltip (the default value is "See it in your room!"). | optional |
data-tooltip_position | Tooltip position towards the button. Available values are top, right, bottom, left (the default value is top) | optional |
data-glitter_disable | If the value is true, glitter will not be displayed | optional |
data-width | Button width | optional |
data-height | Button height | optional |
data-border | Button border | optional |
data-border_radius | Button border-radius | optional |
data-image | Link to the icon that will be displayed on the button. | optional |
data-class_name | Class to be set for the button element on the page | optional |
data-compact | If the value is true, button will be displayed in the compact mode | optional |
data-parameters | Parameter value should be a result of the function | optional |
Additional parameters for “data-parameters” attribute
Parameter | Description |
---|---|
user_id | |
context |