Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PDF File Upload and Display


josecarlos_pb

Recommended Posts

  • 1 month later...
  • 2 weeks later...
This is only the forum to this cool Contribution:

http://www.oscommerce.com/community/contributions,2807/

 

I love this contribution. I tried to add code to change the target to "_blank" when the PDF link is clicked, and I think I added wrong. Where and how should I chaneg the code to make the PDF's open in a new browser window?

 

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

I've installed it succesfuly.

 

Is there a feature to delete pdf file from the admin panel? I could not get it done.

 

Perhaps somebody can help with this?

 

thank

 

TeamWSC

Link to comment
Share on other sites

  • 6 months later...
  • 1 month later...
I have limit to upload files to 2MB, how I can increas this limit?

I think this limit is defined in your PHP installation and not in osCommerce. As a simple workaround, you can upload a smaller file (< 2MB) and then replace this file with the other file via FTP-Client (all files will be copied in the /images/ folder).

Edited by DrHouse
Link to comment
Share on other sites

Hi DrHouse,

I am new to OSC but have been working on the new website. I have tried to install both 1.0 and 1.5 without much success. Would you mind explaining in 1.0 where it says,

"STEP 1 --> IMPORT SQL DATABASE FILE

###################################

Firstly, Open /PHPMyAdmin --> (your_osCommerce_database) --> SQL --> Browse file --> PDF_UPLOAD.sql --> [OK] "

 

I have uploaded the file to the products_ID under products_image table in my database, it there. I still do not have or cannot find the PDF_UPLOAD>sql is it part of the product_ID table?

 

I have also uploaded all of the php files exactly where that are supposed to be. In the product detail page the window and browse button are there but the files will not upload or display? Do you have any suggestions.

EJPRO

[email protected]

 

 

 

I think this limit is defined in your PHP installation and not in osCommerce. As a simple workaround, you can upload a smaller file (< 2MB) and then replace this file with the other file via FTP-Client (all files will be copied in the /images/ folder).
Link to comment
Share on other sites

  • 3 months later...
Hi!

Someone managed to implement this contrib in osCommerce Online Merchant v2.2 RC2a

 

Someone have a qlue how to do so?

 

Regards Tony

 

Its installed okay, yes its on a ms2.2 shop, but the link to the pdf is in text....it can be changed to a jpeg though!

Link to comment
Share on other sites

  • 2 weeks later...
Its installed okay, yes its on a ms2.2 shop, but the link to the pdf is in text....it can be changed to a jpeg though!

 

Hi, I have updated this contribution today, as I found this very useful at work!

 

If you have v2.00 : To have just a jpeg/gif button etc. showing instead of just text find in: /includes/languages/english/product_info.php :

 

define('TEXT_CLICK_TO_PDFUPLOAD', '<IMG STYLE="border: none;" SRC="images/pdf_1.gif" ALT="PDF Datasheet"><font color="#ff0000">--> View PDF Datasheet</font><BR><BR>');

define('TEXT_CLICK_TO_PDFUPLOAD2', '');

define('TEXT_CLICK_TO_FILEUPLOAD', '<font color="#ff0000">-->View Additional Datasheet</font><BR><BR>');

define('TEXT_CLICK_TO_FILEUPLOAD2', '');

 

change to:

 

define('TEXT_CLICK_TO_PDFUPLOAD', '<IMG STYLE="border: none;" SRC="images/your_button1.gif" ALT="PDF Datasheet"><BR><BR>');

define('TEXT_CLICK_TO_PDFUPLOAD2', '');

define('TEXT_CLICK_TO_FILEUPLOAD', '<IMG STYLE="border: none;" SRC="images/your_button2.gif" ALT="PDF Datasheet 2"><BR><BR>');

define('TEXT_CLICK_TO_FILEUPLOAD2', '');

 

Obviously change the yourbutton1.gif to whatever you like!

 

Hope this helps!

 

Kind regards

Chris

Link to comment
Share on other sites

  • 2 weeks later...
I've installed it succesfuly.

 

Is there a feature to delete pdf file from the admin panel? I could not get it done.

 

Perhaps somebody can help me with this?

 

thank

 

TeamWSC

 

Can someone tell me how i can delete the pdf / excel with the admin?

Uploading works super but there aren't posibilities to delete the pdf.

Even if you choose to upload a new pdf in the same product he didn't connect with the new pdf but with the first uploaded one.

 

Sorry for my bad english. This Dutch boy is learning..............................

 

Greetings from Holland

Armand

Link to comment
Share on other sites

I am having an issue with the pdf icon showing on every product regardless of whether it has a file associated to it or not. Any ideas for a fix?

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 4 weeks later...

I have :

http://labourseauxlivres.net/cnegu/DIR_WS_MANUALSHoldUpPlanetaire.pdf

 

With:

2:) ##### open catalog/includes/configure.php

 

find define('DIR_WS_IMAGES', 'images/');

 

##----> add under neath

 

define('DIR_WS_MANUALS', 'manuals/');

define('DIR_WS_CATALOG_MANUALS', DIR_WS_CATALOG . 'manuals/');

 

3:) ### catalog/admin/includes/configure.php

 

find define('DIR_WS_IMAGES', 'images/');

 

 

##----> add underneath

 

define('DIR_WS_MANUALS', 'manuals/');

define('DIR_WS_CATALOG_MANUALS', DIR_WS_CATALOG . 'manuals/');

 

## same file find:

 

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

 

##----> add underneath

 

 

define('DIR_FS_CATALOG_MANUALS', DIR_FS_CATALOG . 'manuals/');

Link to comment
Share on other sites

Ok solved by putting it in product_info.php:

<font size="2"><?php

if ($product_info['products_pdfupload'] == '') {

echo '<a href="' . tep_href_link('/manuals/'. $product_info['products_pdfupload']) . '"target="_blank">' . TEXT_CLICK_TO_PDFUPLOAD2 . '</a>';

} else {

echo '<a href="' . tep_href_link('/manuals/' . $product_info['products_pdfupload']) . '"target="_blank">' . TEXT_CLICK_TO_PDFUPLOAD . '</a>';

}

echo '<br>';

if ($product_info['products_fileupload'] == '') {

echo '<a href="' . tep_href_link('/manuals/' . $product_info['products_fileupload']) . '"target="_blank">' . TEXT_CLICK_TO_FILEUPLOAD2 . '</a>';

} else {

echo '<a href="' . tep_href_link('/manuals/' . $product_info['products_fileupload']) . '"target="_blank">' . TEXT_CLICK_TO_FILEUPLOAD . '</a>';

}

?></font>

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

Good evening!

 

Is there a way to move the links for the pdf and other files outside of the box that contains the "reviews" and "add to cart" buttons?

 

I'm able to upload, link and delte files accordingly but would just like to move the location of the link.

 

Thanks in advance for any and all advice!

 

Jeff

Link to comment
Share on other sites

  • 1 month later...

has any1 tried to make it possible to place pdf's in a sub directory so it is easier to organize the files for manufacturer or category?

I cant seem to get it to show I can't work it out!

work in progress

any help would be great

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