Outputs file metafield on Shopify Storefront for PDF Files (Download link)

PHOTO EMBED

Fri Feb 21 2025 22:47:01 GMT+0000 (Coordinated Universal Time)

Saved by @procodefinder

// if file is always chosen
<a href="{{ product.metafields.custom.file.value.url | file_tag }}" target="new"> Download Rear End Order Form</a>

// if not all files chosen includes "No File Available"
{% if product.metafields.custom.file.value != blank %}
<a href="{{ product.metafields.custom.file.value.url | file_tag }}" target="new"> Download Installation Guide</a>
{% else %}
<p>No file available</p>
{% endif %}

// for product.metafields.custom.file.value.url input your namespace.key so product.metafields.namespace.key.value.url

// edit "Download Rear End Order Form" as needed for your theme
content_copyCOPY

Shopify