How can I add a size chart button above the 'add to cart' button?

hi ,

I’ve followed the steps from https://help.shopify.com/en/manual/online-store/themes/themes-by-shopify/vintage-themes/customizing-vintage-themes/add-size-chart until the last before step, I cannot find product template also i cannot find where to paste the given code in the main-product.liquid. I want help in adding a button called “size chart” on top of my add to cart button.

thanks

Harini

Hi @shiradesigns

Hope you’re having a great day!

Sometimes the name of the files can vary from one template to another. Also the tutorial you are trying to follow is an old one. A lot has changed since then in the theme system especially with the advent of Online store 2.0 themes.

What theme does your store use?

my theme is dawn

i would really appreciate if you tell me each step to get a size chart button.

Hi @shiradesigns

I have found a solution for your problem. It is a solution that will save your work. Find in the GIF image below a screenshot of the solution:

Size chart button on Dawn Theme

Solution

For the “Add a Size chart button” section of the tutorial you were following, do the following:

  1. In the Sections directory, click to open your main-product.liquid file.

  2. Paste the code of block A just after line 314 where the code {%- when 'buy_buttons' -%} is located in the file specified above. If you cannot find the code on line 314, please look for the expression when 'buy_buttons' in the file and paste the code of block A just after the line with the expression searched for:

Block A

{% if product.options contains 'Size' %}
    See Size Chart
{% endif %}

hi , im not able to view the size chart .

Hi @shiradesigns

This is because your a (link) tag is missing the href attribute

Add the “href=”#" attribute to the a tag:

See Size Chart

still no size chart opening

can you tell me step by step on what to do to get size chart in my products page

Hi @shiradesigns

Hope you’re having a great day!

Would you kindly show me the content of size-chart.liquid in the Snippets directory and the content of your main-product.liquid file in the Sections directory?

can u send me your mail id

Hi @shiradesigns

r0nfc47m6@mozmail.com

To avoid spam I use an email address mask. You will get my real email address after sending me your first email.

Have a great day!

Hi, I was just viewing this thread as I ran into this issue.

So to get about this use these apps:

  1. Clean Size Charts: Size Guide
  2. Panda size chart
  3. Smart Size Chart & Size Guide

You can create them easily. I actually figured this out by myself using Panda size chart.

Here is my results:

Add a size chart button above the ‘add to cart’ button: