...
Additional parameters for “data-parameters” attribute
Parameters | Type | Description |
---|---|---|
user_id | string | User identifier or Device identifier |
context | array | |
main_page_link | string | Link added to your clickable logo. |
open_first_room | bool 1/0 | Skipping step a room selection and open any first room |
room_uuid | string | The room with the selected uuid will be opened |
Two-way shopping cart synchronization:
...
Code Block | ||
---|---|---|
| ||
<script type="application/javascript" src="https://wizart-files.fra1.cdn.digitaloceanspaces.com/production/integration/entry-point.min.js"></script> |
Tip |
---|
To initialize the button, you need to call this code with a token, element and vendor code or article query: |
Code Block | ||
---|---|---|
| ||
const entryPoint = new window.WEntryPoint({
token: "your token for wizart",
element: "link to the element to insert the entry point button", // example document.getElementById("0000")
vendorCode: "vendor code for first apply",
articleQuery: Json.stringify({
vendor_code: 'vendor code for first apply',
collection_name: '',
}),
}); |
Parameter | Description | Type |
---|---|---|
token | api token - generated and issued by Wizart Administrator. | Required |
element | link to the element to insert the entry point button (e.g | Optional |
vendorCode | Unique SKU ID of the product uploaded to Wizart system. | Optional |
articleQuery | vendor_code (unique SKU ID of the product uploaded to Wizart system) | Optional |
Info |
---|
Element |
Tip |
---|
To display the button, you need to call the render method. |
Code Block | ||
---|---|---|
| ||
entryPoint.render(); |
...
Code Block |
---|
fontSize, title, tooltipTitle, tooltipPosition, tooltipDisable, glitterDisable, className, borderRadius, parameters, background, color, width, height, border, image, onloadCallback, onCloseCallback, onButtonClick, elementSelector, insertElementPosition, iframeElementSelector, insertIframeElementPosition, onAddShoppigCartItem, // the function is called on the event of adding an article to the cart onRemoveShoppingCartItem, // the function is called on the event of deleting an article to the cart |
Info |
---|
Description of this parameters you can find in the block of first integration. |
Info |
---|
Parameters should write following this structure: |
Code Block | ||
---|---|---|
| ||
const onAddShoppigCartItem = (payload) => { console.log(payload); // { item: { vendor_code: 'vendor_code' }}; } const onRemoveShoppingCartItem = () => { console.log(payload); // { item: { vendor_code: 'vendor_code', removeAll: true }}; } |
Info |
---|
The set method can be used to set vendorCode or articleQuery. |
Code Block | ||
---|---|---|
| ||
entryPoint.set({ vendorCode: '' }); entryPoint.set({ articleQuery: Json.stringify({ vendor_code: '' })}); |
...