Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

Description

Wizart Web Visualizer is a virtual fitting room executed as a standalone web application to be integrated into the client’s website. Its purpose is to allow the user to apply samples of finishing materials on photos of interiors that have previously been marked, as well as users’ personal interior photos. It displays information either from the PIM system (see below) or from the client’s database.

Example of the application without integration: https://webdemo2.wizart.tech

E-commerce example with integration: https://webdemo.wizart.tech

The PIM (Product Information Management) system

  • This system is a server application that stores, in a structured form, detailed information about products and their textures, necessary for application in Wizart visualization products.

The PIM Admin Tool (https://pim-admin.wizart.tech/login)

  • A web administration system that allows the client to quickly manage the data available in the PIM system and the data displayed in Wizart visualization products. Using this tool, the client can upload the necessary textures into the PIM system and use them in Wizart visualization products. For every client a separate Admin Tool is used.

Wizart Web Visualizer is a virtual fitting room executed as a standalone web application to be integrated

Wizart Web Integration

Operational procedure

  1. Get access to the PIM Admin Tool (to be generated and issued by a Wizart administrator) and an API Token

  2. Import the necessary data into the PIM via the PIM Admin Tool (File upload requirements, User manual for PIM admin )

  3. Integrate the Wizart Web application into the client’s website

  4. Integration testing

  5. Release

Requirements to specialists


Basic knowledge of web layout and development:

  • HTML

  • JavaScrip

  • CSS

System requirements

No specific requirements. The application may be integrated into any modern website.

Examples of possible integration areas

The Wizart Web Visualizer opening styles and elements can be completely customized per the client’s wishes.
Below are some examples of possible element layouts.

Main menu:

Product list page:

Product page:

Integrating the Wizart Web Visualizer application into a client’s website

You will need an API Token (to be generated and issued by a Wizart administrator) - api_token

  1. In the source file of the target page, add the required code in the <body> tag, as shown in the listing below.

Since the Wizart Web Visualizer allows to open and visualize a specific product (SKU), please pay attention to how this is implemented separately. This functionality is optional and provided on demand.

<body>

...

<button id="wizart-fitting-room-button" onClick="openFittingRoom()">
  Fitting room
</button>

<button id="wizart-spec-fitting-room-button" onClick="openSpecificFittingRoom()">
  Fitting room Specific Article
</button>

<object 
  id="wizart-fitting-room-object" 
  role="dialog" 
  aria-label="Wizart Fitting Room." 
  type="text/html" 
  >
</object>

<style>
  #wizart-fitting-room-object {
      z-index: 2147483646 !important;
      display: none;
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.8);
  }
  
  #wizart-fitting-room-object.active {
    display: block;
  }
</style>

<script src="./wizart-integration.js"></script>

</body>

2. Using the listing below, create a js-file named wizart-integration.js: upload it to the existing source files of the client’s web application.

// todo get api token from Wizart.
const api_token = 'CLIENT_SPECIFIC_API_TOKEN';
const server_address = 'https://pim-client.wizart.tech';

const fittingRoomObject = document.getElementById('wizart-fitting-room-object');

// bba (back button action) param is used to add back button to wizart component
const fittingRoomEndpoint = server_address
  + '/fitting-room'
  + '?api_token=' + api_token 
  + '&bba=true'
;

function openFittingRoom (searchQuery) {
  const componentEndpoint = searchQuery ? fittingRoomEndpoint + searchQuery : fittingRoomEndpoint;
  fittingRoomObject.setAttribute('data', componentEndpoint);
  fittingRoomObject.classList.add('active');
  
  // should be added to avoid duplicating scrollbars
  document.getElementsByTagName('html')[0].style.overflow = 'hidden';
}

function openSpecificFittingRoom () {
  
  // can be any necessary field supported by search request
  const articleName = 'ARTICLE_NAME_TO_OPEN';
  
  // query can be updated to search for necessary article
  const articleSearchQuery = '&article_query=' 
    + '{\"name\": \"' 
    + articleName 
    + '\"}'
  ;
    
  openFittingRoom(articleSearchQuery);
}

// bba event - fired when back button is clicked at wizart component
window.addEventListener('message', function (event) {
  if (~event.origin.indexOf(server_address)) {
    // exactly 'close_overlay' as it's sent from wizart component
    if (event.data === 'close_overlay') {
      // return overflow of target page to initial state
      document.getElementsByTagName('html')[0].style.overflow = 'auto';

      fittingRoomObject.removeAttribute('data');
      fittingRoomObject.innerHTML = '';
      fittingRoomObject.classList.remove('active');
    }
  }
});

4. (Optional) To change default Wizart logo to your company logo add logo_path and small_logo_path parameters and set values to appropriate link to both logo files. Use the listing below to change the part of code specified in p.2

const fittingRoomEndpoint = server_address
  + '/fitting-room'
  + '?api_token=' + api_token
  + '&bba=true'
;

to that

const fittingRoomEndpoint = server_address
  + '/fitting-room'
  + '?api_token=' + api_token
  + '&bba=true'
  + '&logo_path=LINK_TO_YOUR_LOGO'
  + '&small_logo_path=LINK_TO_YOUR_SMALL_LOGO'
;

5. Save and move all the changes into the work environment of the client’s website.

6. Check and verify that the integration is operational.

The integration is now considered complete.

In case you have any additional questions or issues, please contact Wizart technical support: developer@wizart.tech

Simple integration: Video tutorial

  • No labels