How do I install Best Fit – Size Chart manually?

Best Fit -Size Charts will automatically be installed into your live theme. Follow the directions below to install the code manually.

  1. To install the code manually, first navigate to your Shopify admin and click Online Store.
  2. Next, go to the Actions dropdown and select Edit Code.
  3. Open the theme.liquid file and paste in the following code between the <head> and </head> tags. Now the size chart button should show up in your product templates.
 <script>
var sizeChartsRelentless = window.sizeChartsRelentless || {};

sizeChartsRelentless.product = {{product | json}};

{% if product.collections %}
sizeChartsRelentless.productCollections = {{product.collections | json}};
{% endif %}

{% if shop.metafields.sizechartsrelentless.size_charts %}
sizeChartsRelentless.metafield = {{shop.metafields.sizechartsrelentless.size_charts}};
{% endif %}
</script>

 

Was this article helpful?
Dislike 9

Pin It on Pinterest