I've installed the following addon:
http://addons.oscommerce.com/info/8560/v,23 (Protected images for osc2.3.3
Now I'm trying to get the pdf-datasheet to be compatible with this addon.
I think, I'm quite far in the right direction but as I'm not a coder, I'm not sure wether this is correct,
I checked the new image route, this is correct, but I still get the following error message:
TCPDF ERROR: [Image] Unable to get image: images/1
The changed code is as follows:
function execute() {
global $PHP_SELF, $pdf, $products_id, $languages_id, $currencies, $current_y, $image_folder;
if( basename( $PHP_SELF ) == 'pdf_datasheet.php' && isset( $products_id ) && $products_id > 0 ) {
// Get the product name
$product_info_query_raw = "
select
pd.products_description,
pi.image,
p.image_folder,
p.image_display
from
" . TABLE_PRODUCTS . " p ,
" . TABLE_PRODUCTS_DESCRIPTION . " pd left join
" . TABLE_PRODUCTS_IMAGES . " pi
on (pi.products_id = pd.products_id
and pi.sort_order = '1')
where
pd.products_id = '" . $products_id . "'
and pd.language_id = '" . ( int )$languages_id . "'
";
$product_info_query = tep_db_query( $product_info_query_raw );
$product_info = tep_db_fetch_array( $product_info_query );
// BOF Protected Images for osCommerce 2.3.3
$image_size = '';
if ($product_info['image_display'] == 1) { // use "No Picture Available" image
$image_size = tep_image(DIR_WS_LANGUAGES . $language . '/images/' . 'no_picture.gif', TEXT_NO_PICTURE, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5" style="float: right;"');
} elseif (($product_info['image_display'] != 2) && (tep_not_null($product_info['image']))) { // show product images
// EOF Protected Images for osCommerce 2.3.3
// Get the image information
$image_size = getimagesize(DIR_WS_IMAGES_PROD . $product_info['image_folder'] . $product_info['image']);
I probably need to change more files, but I tried this one as a start.
I hope you've got some time to help me out,
Thanks,
Gerhard



Find content
Male

