Add an "Add to Cart" Button in your Product Finder Result

Last updated January 5, 2023

With the given login credentials you can access your account at Skin Match Technology by logging in at getskinmatch.com > Administration > Edit Questionnaire.

There are two options available for the add-to-cart functionality:

Option 1: Cart-Link

Create a URL that will add a specific product to the cart. If you don’t have such an URL, you’ll have to implement a script that receives an EAN and adds it to the cart.

For example: shop.com/addToCart.php?ean=12345678910

For this option click on Administration > Edit Questionnaire > Products 

  1. Click on the Edit pen to open the product and add the post message link.

  2. Scroll down to Cart URL: http(s):// and copy & paste the cart link.

  3. Make sure you have the correct EAN added in the link placeholder.

  4. Make sure you have added the Cart URL to each language by navigating the languages at the top.

  5. Click Save

  6. Preview your Settings by going back and clicking on Edit Questionnaire > Overview or use the preview link to test it.

Option 2: Post Message

  1. Click on Administration > Edit Questionnaire > Question Flow 

  2. Click on the Edit pen of the last slide

  3. Scroll down to “Enable postMessage Add-to-Cart?” and “Enable postMessage Add-to-Cart for entire Routine?” 

  4. Enable the ones you would like to use.

  5. Click Save

  6. Preview your Settings by going back and clicking on Edit Questionnaire > Overview

We will now send a postMessage with the following format to your site:
postMessage({ ‘action’: ‘add-to-cart’, ‘ean’ : ‘XXXXXX’, ‘sku’: ‘XXXXX’, ‘url’: https://www.yourwebsite.com/additional/information}, “*”)

You need to implement the necessary code to read the postMessage and add the EAN to the cart.

Related Topics