Linking an image to a link using metafield on product pages

Hi @TUB ,

If you use Dawn theme. May I suggest to update code these steps:

  1. Go to Settings-> custom data → Products

  1. Add 2 metafields
  • Name: icon, Type: files(images)

  • Name: pdf, Type: files( Accept all file types)

EBOOST_1-1715223341616.png

  1. Go to each product to add data to these fields

  1. Add code below to anywhere that you would like to show
{%  if product.metafields.custom.icon.value and product.metafields.custom.pdf.value %}
  
  
  
  
{% endif %}