Create a download page?

New Member
1 0 0

Hey.

 

Do anyone know a solution to create a download page?

I have alot of products that the customer need documentation for.

 

So i have a folder with 1000 pdf's all marked with a number.

 

I need to be able to have a page where the customer can search for this number and find the right pdf to download.

0 Likes
Shopify Staff
Shopify Staff
346 16 50

Hello, @las1!

 

Karlie here from the Shopify Guru Team! There are a few apps that come to mind when looking for a digital download feature to add to your Shopify storefront, however, these apps work by sending the customer the download link via email after the customer has purchased the product. By sending the digital download to the customer when they purchase the product, the customer should be able to refer back to that email when they need the download. If you are looking to design a page on your storefront with all of the download links available, then you may want to reach out to a developer or a Shopify Expert for help. 

 

If you're interested in checking out some of the digital download apps that I had mentioned, be sure to check them out below:

 

I hope this has answered your question. If not, or if you have any further questions please let me know. I will be happy to help!

 

*Karlie* | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Astronaut
1069 144 256

Do you have a simple naming convention for the PDFs? The best way to do that would probably be a consistent name followed by a number starting at 0. Then you can create a new page by going to Online Store > Pages > Add Page. You can write HTML in the WYSIWYG editor as well as javascript. I'd think the best way to do this for 1000 pdfs would be to use a loop in javascript. So you would upload your PDF's in Settings > Files > Upload Files. Then you can create an element and append the links to the element in the editor. So let's say your pdfs were named product-pdf_0, product-pdf_1, product-pdf_2, etc all the way to 1000. You could output a list kind of like this:

 

<div id="link-container">
  
</div>
<script>
let container = document.getElementById('link-container');
for (var i=0; i < 1000; i++){
let template = 
'<div class="product_link"><a href="https://cdn.shopify.com/s/files/1/0561/0261/files/product-pdf_' + i + '.pdf">Download</a></div>';
container.insertAdjacentHTML("beforeend", template)
}
</script>

This is just a simple example, and is definitely not a copy paste solution. Alternatively to hard coding it, you can use an app as suggested above.

 

Here's an example of what this would output, creates 1000 download links and if you check their destination you'll see they follow the naming convention. Obviously these links lead to nowhere because I don't have pdfs uploaded.

 

https://codepen.io/ninthony/pen/WNbewWN

 

If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes