Skip to main content

How to Display the Kiwi Size Chart in the Featured Product Section on the Homepage

Steps to feature the Kiwi Size Chart on your store's homepage.

To showcase the Kiwi size chart in your featured product section, follow these steps to add the necessary script to your theme:

  1. Open your code editor and locate the theme.liquid file. Insert the following snippet right before the </head> tag:

    <script type="text/javascript"

    defer src="https://app.kiwisizing.com/web/js/dist/kiwiSizing/plugin/SizingPlugin.prod.js?v=340">

    </script>
    Dawn code editor: theme.liquid open with the  tag highlighted
  2. Next, navigate to the featured-product.liquid file.
    ​

    Edit code for Dawn with featured-product.liquid file selected
  3. In the liquid file, find the location where you want the size chart to display. Insert the following code:

    <!-- START KiwiSizing code !-->

    <div id="KiwiSizingChart"
    data-collections="{{ product.collections | map: 'id' | join: ','}}" data-tags="{{ product.tags | join: ',' | escape}}"
    data-product="{{product.id}}"
    data-vendor="{{product.vendor | escape}}"
    data-product-name="{{product.title}}"
    data-product-images="{{product.images | json| escape}}"
    data-type="{{product.type | escape}}">
    </div>

    <!-- END KiwiSizing code !-->
  4. Ensure you save the changes in both the theme.liquid and featured-product.liquid files.
    ​

    Edit code for Dawn: featured-product.liquid open, Save highlighted

For more information on the snippet, see this guide: Can I use code snippets instead of injection selectors?

Did this answer your question?