Tagged: pdf, store, woocommerce
-
AuthorPosts
-
May 29, 2019 at 11:29 pm #1105300
I am using the Store demo for my Woocommerce and I would like to add a datasheet in pdf for each product.
I know there is a Downloadable Product option, but that is not what I want (because people would be allowed to download the datasheet only if they buy the product) – I want to let people to be able to download the datasheet even if they don’t buy the product.
How can I do this?
- This topic was modified 5 years, 6 months ago by PIW.
May 30, 2019 at 6:53 am #1105357you can force download by different methods.
One globaly – put this into your htaccess file in the root directory:<FilesMatch "\.(?i:pdf)$"> <IfModule mod_headers.c> ForceType application/octet-stream Header set Content-Disposition attachment </IfModule> </FilesMatch>
or f.e. place the download in this way:
<a href="https://domain.de/xyz.pdf" download="Aufsatz_ueber_Nettiquette.pdf">Nettiquette</a>
for better adivce it would be necessary to see your site.
May 30, 2019 at 4:53 pm #1105462Thanks for the reply.
There isn’t a way to add a custom field, so it would check, for example, if there is a PDF with the same REF and show a button to download it?May 31, 2019 at 12:52 am #1105534I am using this plugin WooCommerce Product Attachment.
Sadly, we need to do it manually – there is no way to link the REF to the pdf file.May 31, 2019 at 10:04 pm #1105877with that code in htaccess file – every link to a pdf will end in a download. https://kriesi.at/support/topic/adding-a-pdf-download-to-store-products/#post-1105357
June 3, 2019 at 10:00 pm #1106845Thanks Guenni007, but how WP will know which file to link to?
June 9, 2019 at 4:02 am #1108527Hi,
Thank you for writing to us.
To add a PDF file on all products which can be downloaded without buying the product you can create a download button in the product description.
You have to manually add the pdf to each product page.
You can also follow @Guenni007 method in that case too just create pdf download links for each product.
If you add it as a product then it cannot be downloaded without purchasing.
Hope this helps.
Best regards,
Vinay -
AuthorPosts
- You must be logged in to reply to this topic.