How to integrate TRY ON buttons

Warning: If you are not familiar with Liquid (Shopify's templating language), we do not recommend making any changes to your store's theme.

Go to Online Store > Themes and choose a theme into which you would like to integrate the button. Click the Actions button and choose Edit code.

Integration of the TRY ON button into the product page

  1. Find the template file of your product page. It’s usually located in the Snippets folder and named as "product.liquid".
  2. Paste the following code in the desired place
    <button type="button" class="virtooal-tryon-btn virtooal-tryon-btn-product-page" data-virtooal_id="{{product.selected_or_first_available_variant.id}}" style="display:none">TRY ON</button>
  3. Save changes

Integration of the TRY ON button into catalog/collection page

  1. Find the template file of your collection page’s items. It’s usually located in the Snippets folder and named as "product-grid-item.liquid".
  2. Paste the following code in the desired place
    <button type="button" class="virtooal-tryon-btn virtooal-tryon-btn-collection-page" data-virtooal_id="{{product.selected_or_first_available_variant.id}}" style="display:none">TRY ON</button>
  3. Save changes
Note: Please note that the button has to be hidden by default.

Now you can check the results on your product and collection pages. Make sure that at least one of your products is already integrated and published in your Magic Mirror, otherwise, the buttons will not be displayed.

Tags

Related articles

How can we make your shopping experience more effective? Let's talk

Any questions? Our consultants will get in touch.

Contact us

Support
Support
Support