Hello, does anyone know if it’s possible to put a link text next to (or underneath) a variant and how to do it? Please see the images, one is what the page is like now and another is a mockup for what I mean by having a link text next to a variant. Basically, I just want to have a link to a size chart page, locating next to ‘size’ variant on a product page. Can anyone please help?
hi,
Hi,
Hope you know coding. Please take backup first
-
Edit code> Snippets folder> product-template.liquid" or similar
-
Search code that generates the product variants. example: {% if product.variants.size > 1 %} … {% endif %}.
Inside this code block, find the line that outputs the ‘Size’ variant. like {{ variant.title }} or similar.
Edit the line and add a link to your size chart page.
For example, like this: Size Chart: {{ variant.title }}.
Replace /pages/size-chart with the actual URL of your size chart page.
- Save>Preview and Publish
Hope this will help, you can contact us if you still need help.
Hi, thanks for the reply. I can’t see ‘product-template.liquid’ in my Snippets folder, but there are these files (please see attached image). I forgot to mention that I use Dawn theme, if that’s relevant. Also, is it possible to have the link text on only some of the product pages but not all? I know very basic coding, but I can attempt to follow…
You can check product-variant-options.liquid . If you still need help you can contact us , details given at Signature
OK, I’ve found a simple solution and it has worked perfectly for me. In case anyone’s interested, it all can be done in ‘Online Store’ > ‘Customize’ without editing code. Basically you just need to create another product template, customise how you want it, and then assign a specific product/products to this new product template. In my case, on my new product template, I added a new ‘text’ block underneath variants. With this new block, I can then customise the text including making the text linkable. Then I assigned those products with sizes to this of my new product template. This can be done on ‘Products’ > individual product page where you store and edit their info, sale channels etc. Under ‘Online Store’ > ‘Theme Template’, you can change to any product template you’ve created.
More info about template:
https://help.shopify.com/en/manual/online-store/themes/theme-structure/templates


