Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PDF File for extra info


Guest

Recommended Posts

Posted

can anyone help with regard to this contribution;

 

PDF Upload and Display v1.0 Here is the contribution: http://www.oscommerce.com/community/contri...,all/search,pdf

 

i have installed it and it works, but i require the pdf to open in a new smaller window as large pop up, so that the customer doesn't navigate away from the site, because at present, the pdf opens in existing window and the customer doesn't realise they have to 'go back' in their browser to be where they were.

 

Also, the contribution provides a text link but i also need a logo of adobe acrobat, so can anyone show me the code to add to show a linkable image. Please bear in mind that this, like the text link, is automated and cannot be per product manual link.

 

Also, its only a small query, but i had to add a few ' ' to space away from left column (in the english file of product_info.php), but that now means that the underline hover also underlines the spaces. So if anyone can tell me how to do a clor change for hover rather than underline - that would be great, but please bear in mind that there is no 'class' set in the contribution to call from stylesheet so i don't know how it currently shows as 'smallText', nor do i know where it is pulling the underline from when hovered.

 

Here is the part of code that is added to catalog/product_info.php:

 

<?php
 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>';
 }
?>

 

Thank you for your help in advance.

 

Here is one of the product pages with the link at the bottom;

My product page - pdf link at bottom

Posted

Yes you need to add the blank parameter to it so should be something like:

 

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

Posted

what happens when you click on it and which part doesnt work?

Posted

I also have similar problems with this does anyone else have any ideas. I tried the suggestion of Enigma above and it came up page not found.

 

Also tried 'target_new' this also had same error.

 

thanks

 

Jaz

Posted

Try:

 

<?php

 

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

 

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

 

} else {

 

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

 

}

 

?>

Your online success is Paramount.

Posted
Try:

 

<?php

 

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

 

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

 

} else {

 

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

 

}

 

?>

 

Great Emmett - Thank you

 

Can anyone advise on the last issue with this post whereby the contribution provides a text link but i also need a logo of adobe acrobat, so can anyone show me the code to add to show a linkable image. Please bear in mind that this, like the text link, is automated and cannot be per product manual link.

 

Also, its only a small query, but i had to add a few ' ' to space away from left column (in the english file of product_info.php), but that now means that the underline hover also underlines the spaces. So if anyone can tell me how to do a color change for hover rather than underline - that would be great, but please bear in mind that there is no 'class' set in the contribution to call from stylesheet so i don't know how it currently shows as 'smallText', nor do i know where it is pulling the underline from when hovered.

 

Thank you very much in advance

  • 5 months later...
Posted

Here is what I did:

In catalog/product_info I moved this line

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>';

}

 

 

to AFTER the call to the image for reviews around line 224:

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>

<td class="main" align="right"><?php

 

Keep In mind I also have "remove prices if price=0" installed

I also deleted the text "Free Download" from that install and added it to catalog/includes/lang/eng/product_info with a <br> tag where is says "View PDF File"

Have a look:

http://trollingmotordepot.com/catalog/prod...roducts_id/5390

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...