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
Click on the Edit pen to open the product and add the post message link.
Scroll down to Cart URL: http(s):// and copy & paste the cart link.
Make sure you have the correct EAN added in the link placeholder.
Make sure you have added the Cart URL to each language by navigating the languages at the top.
Click Save
Preview your Settings by going back and clicking on Edit Questionnaire > Overview or use the preview link to test it.
>> Learn how to create a cart URL for Shopify here.
Option 2: Post Message
Click on Administration > Edit Questionnaire > Question Flow
Click on the Edit pen of the last slide
Scroll down to “Enable postMessage Add-to-Cart?” and “Enable postMessage Add-to-Cart for entire Routine?”
Enable the ones you would like to use.
Click Save
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.