Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PDF LINK


nouck

Recommended Posts

if you use PDF datasheet

 

find in CATALOG/product_info.php

 

            <?php echo $product_info_values['products_name']; ?>

 

add BEFORE !!!

            <?php echo '<a href="' . tep_href_link(FILENAME_PDF_DATASHEET, 'products_id=' . $product_info_values['products_id']) .'" target="_new" align="absmiddle">' . tep_image('pdf/pdf.gif','Make a printable PDF sheet of this product (you need to have Adobe Reader installed)') .'</a> '; ?>

 

so it looks like:

 

complete preview between <tr> ............. </tr>

 

 

          <tr height="40">

           <td class="blueHeading"><?php echo '<a href="' . tep_href_link(FILENAME_PDF_DATASHEET, 'products_id=' . $product_info_values['products_id']) .'" target="_new" align="absmiddle">' . tep_image('pdf/pdf.gif','Make a printable PDF sheet of this product (you need to have Adobe Reader installed)') .'</a> '; ?><?php echo $product_info_values['products_name']; ?></td>

           <td align="right" class="pageHeading"><?php echo $products_price; ?></td>

         </tr>

 

NOTE: (in the above preview)

class="blueHeading"

 

i have added myself in stylesheet.php so you will NOT have that

 

Enjoy

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

Thanks for the reply.

 

What I am looking for is... A link to the DATA SPEC Sheet of PDF wich I would get from Manfacture not my products INFO. I dont wont to link directory to the manufacture website, rather, to my own pdf in the server.

 

example. when user click on pdf image icon, it will link to http://localhost/sample.pdf. I will download the pdf from the manufacture and put it in my server. When adding a new product, I want to be able to have option to link to pdf file or not. Not all the products will have a pdf data spec sheets.

 

sorry if I confused ya.

Link to comment
Share on other sites

  • 1 year later...

I'm looking for the same thing.

 

I would like my store admins to be able to upload a product data sheet the same way they would upload an image in the product creation screen.

 

Then end user would see a link simmilar to the "visit this products website" but it would download the PDF I have defined for this product.

Link to comment
Share on other sites

You know, alot of internet polls specify that alot of people do not like PDF files. Even on fast computers, acrobat takes a long time to load a file if it was not yet open. I know that I always avoid PDFs online, I would rather search for a similar document in HTML format. There was even a segment on TechTV about this, and they had a poll which showed most users feel the same about this as I do (IE, not liking PDF links online).

 

If you wanted, you can use a site like this, http://www.gohtm.com/ to convert all those PDFs to HTML and then you can link to the HTML in the product admin section by adding a link to it where it says Products URL.

 

If you still wanted to use PDF's though, would not the same thing work if you used that same area to link to the *.pdf on your server instead of an HTML?

Link to comment
Share on other sites

You are right on all counts.

 

But I am working with a client whos suppliers send PDF spec sheets and he likes to use them as they are.

 

Also yes we can use the link area to simply link to a PDF file already residing on the web server, but what it sounds like we both want is a simple way to upload and link to a PDF file in the 'New Product' screen. Making it easier for a client who is not web savy to make happen.

 

Seems like at some point someone might have built something like this so it doesn't hurt to ask.

Link to comment
Share on other sites

Now, the best thing would be if you could choose to upload the file like you want, and by doing that the information will be converted to HTML and automatically entered into the product description. That way people dont need to look at any links or wait for acrobat to load, and all the info will be right on the product page where it can be seen.

 

If someone could make that into a contribution, that would be pretty cool. :D

Link to comment
Share on other sites

  • 6 months later...
  • 7 months later...
"simple way to upload and link to a PDF file in the 'New Product' screen. Making it easier for a client who is not web savy to make happen. "

any luck resolving this?

 

I know this is an old thread, but I have just installed a mod that does this.

 

It is PDF File Upload and Display. A quick install and it works a treat.

 

I was hoping someone else who had it and is better with php might be able to help me change the simple text link that the mod gives into a a smarter-looking button.

 

Any help would be gratefully appreciated.

 

Simon

Link to comment
Share on other sites

Hey - sorry to sidetrack the conversation - but I am using the pdf upload contrib and for some reason the link to the pdf appears in products that don't have a pdf!

 

Any ideas?

Link to comment
Share on other sites

Hey - sorry to sidetrack the conversation - but I am using the pdf upload contrib and for some reason the link to the pdf appears in products that don't have a pdf!

 

Any ideas?

 

I'm no expert at these things, but my guess is that the answer lies in the "if" part of the following code in product_info.php

 

Here's what I have...

  <?php
//pdf upload STARTS  
if ($product_info['products_pdfupload'] == '') {
 echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_pdfupload']) . '">' . TEXT_CLICK_TO_PDFUPLOAD2 . '</a>';
 } else {
 echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_pdfupload']) . '">' . TEXT_CLICK_TO_PDFUPLOAD . '</a>';
 }
//pdf upload ENDS
 ?>

 

Best I can offer, I'm afraid

 

Regards

 

Simon

Link to comment
Share on other sites

  • 3 months later...
I'm no expert at these things, but my guess is that the answer lies in the "if" part of the following code in product_info.php

 

Here's what I have...

 ?<?php
//pdf upload STARTS ?
if ($product_info['products_pdfupload'] == '') {
?echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_pdfupload']) . '">' . TEXT_CLICK_TO_PDFUPLOAD2 . '</a>';
?} else {
?echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_pdfupload']) . '">' . TEXT_CLICK_TO_PDFUPLOAD . '</a>';
?}
//pdf upload ENDS
??>

 

Best I can offer, I'm afraid

 

Regards

 

Simon

 

Hi Just to add to this , if i wanted to delete the pdf file that is linked with it, how do i do it. i tried deleting the file from the folder but when i go to my product info page there is a link there but it goes to a error page...

 

is there anyway i can acheive this... the upload works fine just the deleting part in the admin where can i do that.

Link to comment
Share on other sites

Hi Just to add to this , if i wanted to delete the pdf file that is linked with it, how do i do it. i tried deleting the file from the folder but when i go to my product info page there is a link there but it goes to a error page...

 

is there anyway i can acheive this... the upload works fine just the deleting part in the admin where can i do that.

 

Not as far as I understand. if there is no pdf for a product you will get the error page. my workaround is to have a placeholder pdf (or gif) and attach that to every product for which I don't have a pdf.

Link to comment
Share on other sites

  • 1 year later...
Not as far as I understand. if there is no pdf for a product you will get the error page. my workaround is to have a placeholder pdf (or gif) and attach that to every product for which I don't have a pdf.

 

Everything is kinda working ok except that when i click the "Click to view PDF Brochure", the file is not there, it didnt upload. When i manually upload the pdf to the images folder, it works.

 

What code should i check to see about the uploading problem?

 

Thanks.

Link to comment
Share on other sites

  • 6 months later...
Everything is kinda working ok except that when i click the "Click to view PDF Brochure", the file is not there, it didnt upload. When i manually upload the pdf to the images folder, it works.

 

What code should i check to see about the uploading problem?

 

Thanks.

 

Ok, managed to fix the pdf upload problem by moving the PDF Upload code back a few lines in categories.php. Had to turn off PHP image manager though which isnt really ideal coz that PHP image manager is feckin deadly! But the PDF upload is working with the normal upload method.

 

So now im having a problem with max file size on PDF's, looks like it has problems uploading 4MB or 5MB PDFs, just says that nothing uploaded even though you're waiting ages as if it is uploading... anyone know how to increase the max file size for PDF's?

Edited by sonictrip.net
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...