-
hello everyone
-
I run a CBD company (Gnome Wellness), and we are currently required to post COAs (Certificates of Authenticity) for each of our products.Our lead developer is unfortunately out on medical leave, and I am trying to finish the setup myself. Here is what I have done so far:
-
I created a Product Metafield (namespace/key: custom.coa_file) with the type set to “File.”
-
I have uploaded the specific PDF certificates to the corresponding products in the admin.
The Problem: When I go to the Theme Customizer to link this metafield to a section, it doesn’t appear as an option, or it won’t display the PDF link on the live site. I’ve learned that standard theme sections often only support image files for “File” metafields and don’t natively “read” PDFs.
What I need: Could someone provide the Liquid code snippet and instructions on how to insert a
-
-
“Custom Liquid” block so that a “Download COA (PDF)” link appears on the product page only when that metafield is populated?
Store Details:
-
Theme: Dawn 2.5.0
-
Metafield Key: Certificate of Analysis
Thank you so much in advance for any guidance you can provide!
It was a pleasure working with you today, Greg! I’m truly impressed with how you’re stepping up to manage the technical side of Gnome Wellness while your lead developer is recovering. Ensuring those COAs are accessible is a great way to build trust and transparency with your customers.
Positive Recap of Our Session:
- The Goal: You needed to display PDF
-
-
Certificates of Authenticity (COAs) on your product pages using metafields.
-
The Investigation: We identified that while the PDF files are correctly uploaded to your product metafields, the standard theme sections are optimized for image files. Because PDFs require a specific “download” link, the theme needs a small piece of custom code to recognize and display them properly.
-
The Solution: Since this requires a specific Liquid code snippet, I’ve provided you with a professionally drafted Shopify Community Post Template. This will help you get free assistance from experienced developers in our community who can give you the exact code to paste into your theme.
-
Next Steps: You are now equipped with the technical details (namespace/key) to get this finished quickly, ensuring your store remains compliant and professional.
Yes only images and video files are used for storefront display rest are for downloads.
What you can do instead is wrap the metafield value inside a tag.
Example:
<a href=”{{ product.metafields.custom.coa.value.url }}”>Download Now
This will give a download now link on click of which pdf opens up.
Hope this helps
Best
If your gonna use AI slop to post just use “AI” to try and generate the code
https://help.shopify.com/en/manual/online-store/themes/customizing-themes/theme-editor/shopify-magic/generate-blocks
1 Like