provide PDF link to a document on product page (each product has different document)

Solved

provide PDF link to a document on product page (each product has different document)

ejanko
Tourist
9 0 1

Can someone help me add a link to each product page that will show a unique document per product? 

Accepted Solution (1)

gr_trading
Shopify Partner
1944 145 203

This is an accepted solution.

Hi @ejanko,

 

Would request you to refer to the below video to implement the same.

 

 

Hope it helps...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee

View solution in original post

Replies 15 (15)

GemPages
Shopify Partner
5625 1262 1251

Hello @ejanko 

 

You can consider using the Metafield from shopify : https://help.shopify.com/en/manual/custom-data/metafields

 

I hope the above is useful to you.
Best regards,
GemPages Support Team

GemPages - Build any high-converting store pages for any business


- If you find my reply helpful, please hit Like and Mark as Solution
- Get connected: App Store | Blog | Community | Help Center

gr_trading
Shopify Partner
1944 145 203

This is an accepted solution.

Hi @ejanko,

 

Would request you to refer to the below video to implement the same.

 

 

Hope it helps...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
ejanko
Tourist
9 0 1

Many many thanks for this video!  Exactly what I was looking for.  I am so thrilled this problem is now behind me!   

ejanko
Tourist
9 0 1

Hi, 

 

I realized after implementing this, I have several variations for some products that will each require it's own lab test based on strength.  Is there different code that will call either display multiple documents, or is there a way to add a separate doc for each  variation?  Ugh.  

gr_trading
Shopify Partner
1944 145 203

Process will be the same but this time metafield will be created at variant level instead of product.

 

But you would need a script code which will show file reference for selected variant only.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
ejanko
Tourist
9 0 1

Thanks so much for your time, the same problem still occurs.  A single document works on the product side, but when I do the same for variants, the document shows 'not found' even though I added to the variant setup.  The files are contained in my 'files' folder.  Then I tried 'multiple files' on the same product metafield and having the same issue.  

gr_trading
Shopify Partner
1944 145 203

Please share the screenshot 

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
ejanko
Tourist
9 0 1

variantfile.PNG

LIQUID.PNG

customdata.PNG

  and then I get the shopify 'file not found' error message.  Thanks again. 

gr_trading
Shopify Partner
1944 145 203

@ejanko 

 

For variant this will not work like this as variant is a part of product and they could be multiple in nature, therefore you can't access metafield like this.

 

You have to be write more custom codes for it.

 

As already mention in earlier msg if you able to achieve this using above code.

 

It will print all variant file URL at once. You need custom script as well.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee

EasifyApps-Zoe
Shopify Partner
582 14 47

 

Hi @ejanko,

There's a simple solution to adding a PDF link to your product page that you might not have heard of yet - the free Ease Product Attachments app.

With this app, you can easily upload and assign PDF files to specific products or collections (or all products), and even add icons for visual appeal.

add pdf files to shopify.png

Plus, it's user-friendly and easy-to-use, even for those who aren't tech-savvy.

So, if you're looking to add more files to your product pages in the future, give this app a try.

 

upload pdf to shopify.png

EASIFY - MAKING SHOPIFY SIMPLE & SWEET!
Easify Product Options: Create custom product options 10X faster & easier!
Easify Product Attachments: Effortlessly add downloadable PDF files (or any other format) to Shopify pages!
Try for Free | 24/7 Live Chat Support

PaceheadsFabi
Shopify Partner
21 0 2

Hi, thanks a lot for the Video! Unfortunately I have the same issue, already mentioned here. When I click on the Link, I get a 404 page and the PDF can not be found.

 

I added this Code:

<p><a target="_blank" href="{{product.metafields.custom.bike_geometry_pdf | file_url}}">PDF</a></p>

 

When I Click in the Link, following page opens up:
https://cdn.shopify.com/s/files/1/0270/5647/2152/files/?12596

 

The correct PDF is here:

https://cdn.shopify.com/s/files/1/0270/5647/2152/files/Rondo_Geometrie_-_MYLC_CF1.pdf?v=1683620953

 

I added the code in a Custom Liquid section on a product template and attached the pdf on product level to the product.

 

 

gr_trading
Shopify Partner
1944 145 203

Would u mind sharing store url and password if required.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
PaceheadsFabi
Shopify Partner
21 0 2
gr_trading
Shopify Partner
1944 145 203

@PaceheadsFabi 

 

Seems the template is not able to identify the file name are you checking not blank for metafield.

 

Wouldn't help without reviewing the code can you share the video privately or here?

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee

Noharoni1
New Member
8 0 0

Thanks veru much