Jump to content
Sign in to follow this  
alverman

[contribution] PDF data_sheet maker v.1

Recommended Posts

Hi,

 

I'm using 2.2-CVS Daily Snapshot (05/08/2003) and when I change product_info.php like instructed in contrib file

 

quote;

2.2 CSV add:

 

<?php echo '<a href="' . tep_href_link(FILENAME_PDF_DATASHEET, 'products_id=' . $product_info_values['products_id']) .'" target="_self">' . tep_image('pdf/pdf.gif') .'</a>'; ?>

 

it shows blank pdf

 

I erased values so now it looks like this;

 

<?php echo '<a href="' . tep_href_link(FILENAME_PDF_DATASHEET, 'products_id=' . $product_info['products_id']) .'" target="_self">' . tep_image('pdf/pdf.gif') .'</a>'; ?>

 

and it works

 

Regard

 

Dami

 

Damir you are using MS1 so you did exactly what the readme says:

/////////////////////////////////// READ CAREFULLY ///////////////////////////////////////

IN /catalog/product_info.php

 

2.2 MS1 add:

<?php echo '<a href="' . tep_href_link(FILENAME_PDF_DATASHEET, 'products_id=' . $product_info['products_id']) .'" target="_self">' . tep_image('pdf/pdf.gif') .'</a>'; ?>

 

2.2 CSV add:

<?php echo '<a href="' . tep_href_link(FILENAME_PDF_DATASHEET, 'products_id=' . $product_info_values['products_id']) .'" target="_self">' . tep_image('pdf/pdf.gif') .'</a>'; ?>

ivan

Share this post


Link to post
Share on other sites

You can download GIF support for PDF data_sheet maker from the oscommerce contributions page. Also I have change some lines to get the path for the product in the selected language. If anyone wants I paste here the code.

Share this post


Link to post
Share on other sites

Hey, firstly, you have made a great contribution.

 

Now, I want to modify it so that It doesnt print the categories tree at the beginning of the PDF. It just takes up too much space.

Has anyone done this, or knows how to do this?

 

Also, I want to put the Main category on the page with the products, instead of being on a page centered by itself. How do I do this?

 

Any help will be greatly appreciated.

 

Cheers,

Chris :)

Share this post


Link to post
Share on other sites

I am trying to install this contrib, but it appears I am missing something. I am wondering if someone would be so kind as to enlighten me a little.

 

Currently I have all the files etc installed, but when I click on the pdf link I get a page of gobidygoop.

 

From what I have been able to make out so far it's because I am missing this snapshoots program or something.

I am running 2.2 but from what i have learnt so far if I had this Snapshots installed I would also have a whole heap of CVS directories (I currently know no other differences). Well I haven't.

 

So do I have to have this Snapshots program?

How can install this on top of my existing cart?

I don't want to have to start from scratch as I already have a lot mods installed which I've been pocking along at for the last couple of months.

 

Any advice?

 

Thanks, in advance.

Share this post


Link to post
Share on other sites

Don't worry about the previous questions.

I found the answer.

Firstly because I had GZip turned on it was apparently suppressing actual error messages. So, all I saw was a whole lot of mess.

The problem was a Comodo SSL Contribution I had installed. Remove it and all is well with the world.

:D

Share this post


Link to post
Share on other sites

Don't worry about the previous questions.

I found the answer.

Firstly because I had GZip turned on it was apparently suppressing actual error messages. So, all I saw was a whole lot of mess.

The problem was a Comodo SSL Contribution I had installed. Remove it and all is well with the world.

:D

Share this post


Link to post
Share on other sites

I'm using this great contribution, But instead of having the product image on the left and the description to the right of it, I would like the image to be centered and the desription to be below the image, as this is the way my product_info pages are laid out. Anyone know how to do this?

Share this post


Link to post
Share on other sites

Hi everyone

 

It is now 3 days I am trying to make this contribution working but no success

 

After installing all the version from V1 to 1.3 I here is what I get

 

 

Top left my website name

 

PDF_CREATION_DATE : dimanche 30 mars, 2003

 

then 2 grey lines

then a not image picture

then Model : -

Manufacturer : -

 

then a thin grey line

the watermark

then in the footer : TEXT_PDF_FOOTER+my email address and TEXT_PAGE 1/1

 

But I never get a data out of the product page

 

I installed pdf catalog and made this one to work with little gif problems but now it works. I cannot find out what I do wrong.

 

My web site does not have the /catalog directory everything starts at /.

 

If someone has any any it would help me a lot.

 

thanks

Share this post


Link to post
Share on other sites
Hi everyone

 

It is now 3 days I am trying to make this contribution working but no success

 

After installing all the version from V1 to 1.3 I here is what I get

Top left my website name

 

PDF_CREATION_DATE : dimanche 30 mars, 2003

 

then 2 grey lines

then a not image picture

then Model : -

Manufacturer : -

 

then a thin grey line

the watermark

then in the footer : TEXT_PDF_FOOTER+my email address and TEXT_PAGE 1/1

 

But I never get a data out of the product page

 

I installed pdf catalog and made this one to work with little gif problems but now it works. I cannot find out what I do wrong.

 

My web site does not have the /catalog directory everything starts at /.

 

If someone has any any it would help me a lot.

 

thanks

Sorry to see this thread dead. Maybe this will revive it; then again...

 

First anytime you see definition variables (TEXT_PDF_FOOTER) come up like this it means the definition list is missing. Check the contribution. I would use WinMerge to compare the files and see what else is missing.

Share this post


Link to post
Share on other sites
Sorry to see this thread dead. Maybe this will revive it; then again...

 

First anytime you see definition variables (TEXT_PDF_FOOTER) come up like this it means the definition list is missing. Check the contribution. I would use WinMerge to compare the files and see what else is missing.

 

Hi HallMark

 

Thank you for your reply, text_pdf_footer is fixed (I put the english file in the french directory that's why)

 

But my biggest problem is that I do not get any data or images coming from the product page, I just get an empty pdf page with name, date, watermark, footer, no image etc...

 

Regards

Share this post


Link to post
Share on other sites
Hi HallMark

 

Thank you for your reply, text_pdf_footer is fixed (I put the english file in the french directory that's why)

 

But my biggest problem is that I do not get any data or images coming from the product page, I just get an empty pdf page with name, date, watermark, footer, no image etc...

 

Regards

 

 

Hi

 

Ok this issue is fixed too, I placed the pdf icon too early in product_info.php

 

Now I get another problem :

 

The description of the items are in html and the tags are not respected like <br> or all the accentuation is gone, instead of "?" I get "é" I wish accents would not exist, we are fighting with these caracters all year around, for server, sql etc ...

 

Any suggestion ???

Share this post


Link to post
Share on other sites

Hi,

 

I have installed the "products extra fields" contribution, but cannot make these extra fields show in my pdf datasheet document.

 

I think my problem is that I have prolems fusing the product_extra_fields query and the print_catalog query together in the pdf_datasheet_functions:php file. I get a parse error. Can anyone help? The code looks like this:

 

$print_catalog_query = tep_db_query("select p.products_id, pd.products_name, cd.categories_name, p.". PDF_ALT_IMAGE .", p.products_model, pd.products_description, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.products_status, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price,  s.expires_date, m.manufacturers_name from ". TABLE_PRODUCTS . " p left join " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = '" . $products_id . "' and
					p.products_id = pd.products_id
					and pd.language_id = '" . $languages_id  . "'

$extra_fields_query = tep_db_query("
SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value
FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef
LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf
ON ptf.products_extra_fields_id=pef.products_extra_fields_id
WHERE ptf.products_id=". (int)$HTTP_GET_VARS['products_id'] ." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".$languages_id."')
ORDER BY products_extra_fields_order");

while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
if (! $extra_fields['status']) // show only enabled extra field
continue;
}

 

And the erro when I try to open the pdf document looks like this:

 

Parse error: syntax error, unexpected T_STRING in /customers/kjolebutikken.com/kjolebutikken.com/httpd.www/oscdemo1/pdf/pdf_datasheet_functions.php on line 588

 

Hope anyone can help :-)

 

Thanks!


Best regards

Kjolebutikken

Share this post


Link to post
Share on other sites

Hoping someone can answer this. Installed the contribution but my shop is not inside catalog/images, it's store/images so was wondering do I need to change a parm to make the PDF work.

 

thanks


I don't bother doing backups. I love the thrill of screwing it all up!

Share this post


Link to post
Share on other sites

Hello,

 

I am getting the following error :

 

FPDF error: GIF parser: unable to open file images/pdflogo/logo.gif

 

seems it has to do with PHP5 upgrade that the host has done on the server.

 

There was a post where someone indicated a fix with a GIF.PHP file but I did not know where this file needed to be or what else was necesary to make it work with PHP5 ( PHP5 Fix for CGIF class in http://www.oscommerce.com/community/contri...search,pdf+data )

 

Any ideas ?

 

ANyone else used this to solve the issue ?

 

dca

Share this post


Link to post
Share on other sites

I have a new version out 1.7: http://addons.oscommerce.com/info/1077

 

Since v1.6.4

------------

* Added most available options to the admin

* Added a few options to the Admin that didn't exist

* Eliminated unnecessary options from config file

* Multi-lingual ready

* Patched the "Divide by Zero" error when no image exists and "Keep Image Proportions" is set to "Yes"

* Further streamlined product_info link

* Streamlined and updated the code

* Removed the previously integrated code for the "options as images" addon; placed it in a separate folder

* Cleaned up the installation doc

* Added update doc

* Added screenshots

 

Scott

Share this post


Link to post
Share on other sites

Im wondering if anyone has some code to display the more pics images on the page

 

Id like to display the thumbnails of images under the descriptiion and price

 

anyone achieved this?

Share this post


Link to post
Share on other sites

Hi can someone help me,

 

i try to install my Sql file and its gives the following messages:

 

# Data Table configuration INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Show Product Image', 'PDF_SHOW_PRODUCT_IMAGE', '1', 'Shall the product image be displayed on the datasheet?

 

0 = Not Displayed

1 = Displayed', 200, 5, '2005-06-08 21:01:41', '0000-00-00 00:00:00', NULL, NULL), ('', 'Show Product Name', 'PDF_SHOW_PRODUCT_NAME', '1', 'Shall the product name be displayed on the datasheet (already present in header)?

 

0 = Not Displayed

1 = Displayed', 200, 10, '2005-06-08 21:01:41', '0000-00-00 00:00:00', NULL, NULL), ('', 'Show Product Manufacturer', 'PDF_SHOW_PRODUCT_MANUFACTURER', '1', 'Shall the product manufacturer be displayed on the datasheet?

 

0 = Not Displayed

1 = Displayed', 200, 15, '2005-06-08 21:01:41', '0000-00-00 00:00:00', NULL, NULL), ('', 'S[...]

 

Mensagens do MySQL : Documentação

#1062 - Duplicate entry '0' for key 1

 

 

 

also when i click in the products pdf icon the pdf target appears blank,

 

I removed the query part 0 = Not Displayed and the installation was sucessfull, is that procedure Ok? still i don´t see any information in the data_sheet

 

Many thanks

Edited by urbanfactory

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×