...
Additional parameters for “data-parameters” attribute
Anchor | ||||
---|---|---|---|---|
|
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 |
deactivate_custom_photo | bool 1/0 | For deactivating uploading photo. |
...
When the visualizer is open, methods are added to the window.wizartDK to synchronize the shopping cart.
Setting the current state of items in the shopping cart –
setShoppingCartStore
. To transfer the current state of the shopping cart to the visualizer, call the methodCode Block language js const payload = [{vendor_code: 'vendor_code1', quantity: 1 }]; window.wizartDK.setShoppingCartStore(payload);
The method is available after opening the visualizer.
Getting the current state of items in the shopping cart –
getShoppingCartStore
. To get the items in the shopping cart, call thegetShoppingCartStore
method with a callback function. The callback function will receive the items in the shopping cart. The method is available after opening the visualizer.Code Block language js const callback = () => { console.log(payload); // [{vendor_code: 'vendor_code1', quantity: 1}, ...] } window.wizartDK.getShoppingCartStore(callback);
Removing an items from the shopping cart –
onRemoveShoppingCartItem
. To get the goods when they are removed, you must call theonRemoveShoppingCartItem
method with a callback function. The method is available after opening the visualizer.Code Block language js const callback = () => { console.log(payload); // { vendor_code: 'vendor_code', removeAll: true } } window.wizartDK.onRemoveShoppingCartItem(callback);
Adding an item to the shopping cart –
onAddShoppigCartItem
. To add a product, you need to call theonAddShoppigCartItem
function with a parameter{ vendor_code: 'vendor_code' }
. The method is available after opening the visualizer.Code Block window.wizartDK.onAddShoppigCartItem({ vendor_code: 'vendor_code' });
Second integration option:
...