Tagged: , ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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, 5 months ago by PIW.
    #1105357

    you 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.

    #1105462

    Thanks 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?

    #1105534

    I 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.

    #1105877

    with 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

    #1106845

    Thanks Guenni007, but how WP will know which file to link to?

    #1108527

    Hi,

    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

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.