nouck Posted March 23, 2003 Share Posted March 23, 2003 Does anyone know how to make a link on a product Info page to a pdf file? a choice to add a link or not when adding a new product. Just like the image. thanks Quote Link to comment Share on other sites More sharing options...
Druide Posted March 23, 2003 Share Posted March 23, 2003 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 Quote 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 More sharing options...
nouck Posted March 24, 2003 Author Share Posted March 24, 2003 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. Quote Link to comment Share on other sites More sharing options...
rustin Posted March 25, 2004 Share Posted March 25, 2004 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. Quote Link to comment Share on other sites More sharing options...
Goanna Posted March 25, 2004 Share Posted March 25, 2004 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? Quote Link to comment Share on other sites More sharing options...
rustin Posted March 25, 2004 Share Posted March 25, 2004 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. Quote Link to comment Share on other sites More sharing options...
Goanna Posted March 25, 2004 Share Posted March 25, 2004 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 Quote Link to comment Share on other sites More sharing options...
rubygirl Posted October 19, 2004 Share Posted October 19, 2004 "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? Quote Link to comment Share on other sites More sharing options...
luckyhuckster Posted June 14, 2005 Share Posted June 14, 2005 "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? <{POST_SNAPBACK}> 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 Quote Link to comment Share on other sites More sharing options...
Guest Posted June 17, 2005 Share Posted June 17, 2005 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? Quote Link to comment Share on other sites More sharing options...
luckyhuckster Posted June 23, 2005 Share Posted June 23, 2005 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? <{POST_SNAPBACK}> 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 Quote Link to comment Share on other sites More sharing options...
Genius Posted October 13, 2005 Share Posted October 13, 2005 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. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 14, 2005 Share Posted October 14, 2005 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. Quote Link to comment Share on other sites More sharing options...
sonictrip.net Posted March 27, 2007 Share Posted March 27, 2007 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. Quote Link to comment Share on other sites More sharing options...
sonictrip.net Posted October 15, 2007 Share Posted October 15, 2007 (edited) 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 October 15, 2007 by sonictrip.net Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.