Jump to content
kymation

[Addon] PDF Datasheet

Recommended Posts

The first error message tells you that you have an extra define of TEXT_SEE_MORE. Search your code for the duplicate, or just delete the one the error message tells you to.

 

The second is probably an incomplete copy of tcpdf.php. Upload a new copy of that file.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi Jim

 

Since 2 days I'm trying to install this add-on but without success.

 

I tried it on a modified 2.3.3.1 shop and a orginal setup 2.3.3.1. I followed 1:1 your manual but its not working.

 

Modified shop: https://www.nuuonled.com/eshop/pdf_datasheet.php?products_id=33&language=english

 

Orginal shop: http://www.nuuonled.com/catalog/pdf_datasheet.php?products_id=20&language=english

 

I downloaded as mentioned the latest TCPDF version 6.0.023 http://sourceforge.net/projects/tcpdf/files/

 

I don't know if maybe this is not compatible with your add-on ?

 

Maybe you have a idea what's happen.

 

Regards

Andy

Share this post


Link to post
Share on other sites

I can't tell you how to fix "it's not working." You'll have to tell me exactly what doesn't work, and include the error messages.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

@@kymation

 

unfortunately, the error still exists.

 

Fatal error: require() [<a href='function.require'>function.require</a>]: Cannot redeclare class shoppingcart in /home/content/17/8283017/html/shop/catalog/includes/application_top.php on line 126

 

Thanks so much for your help..

Share this post


Link to post
Share on other sites

Hi Jim

 

Thanks for you answer.

 

I wish I can send you some error messages but there are no. As I explained I've installed the add on as explained in you manual (step by step) several times, also I was looking to all posts here but nothing is happen.

 

First I thought its because of the modified shop and this was the reason that I installed one additional original for testing but also in the original the add on doesn't work.

 

My feeling is that the latest TCPDF version is maybe not compatible to your add on and I asked which version you are using in your development environment.

 

I also shared with you the links to possible generated datas sheets that you can see the outcome. Its ending in Chrome with an server error.

 

The website encountered an error while retrieving http://www.nuuonled.com/catalog/pdf_datasheet.php?products_id=20&language=english. It may be down for maintenance or configured incorrectly.

Error code: 500

 

I also switched off rewriter and SEO.

 

Is there anything missing like file permissions which are not mentioned in your manual ?

 

I hope you can help me.

 

Regards

Andy

Share this post


Link to post
Share on other sites

@@bolzebruce

The server error usually means that the permissions are set incorrectly. Ask your host for help in setting your permissions to make the files readable.

 

You might also have to temporarily disable the .htaccess file in the includes/ directory, as that can have this effect on some servers.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi Jim

 

Its our own server. Which of your files or folders should be writable ? TCPDF too ?

 

The .htaccess I disabled temporarily but without any effect.

 

Regards

Andy

Share this post


Link to post
Share on other sites

Nothing needs to be writeable. I don't know what your server configuration is, but all files need to be readable by the server process.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi Jim

 

FYI. Got it running.

The error comes from your pdf_datasheet.php.

 

You require

require_once( 'ext/tcpdf/config/lang/eng.php' );

 

but the eng.php file https://github.com/ebuzzing/tcpdf/blob/master/config/lang/eng.php doesn't exist in the latest TCPDF version 6.0.0.23 http://sourceforge.net/projects/tcpdf/files/

 

Maybe you can add this missing file to your distribution package.

 

Regards

Andy

Share this post


Link to post
Share on other sites

Hi Jim

 

Sorry to bother you again. I've two more small questions.

 

1. Under modules -> pdf datasheet -> fonts *REQUIRED* I can't see in the editing mode any fonts in the drop down lists ? TCPDF font folder exist and your font_list.txt too.

 

2. We synchronize our shop from an external program. In our case all product images are in the table products -> products_image.

How I must modify the source code in pd_description.php to get the picture information from the products table instead of the products_images table + the description.

 

Hope you or somebody else can help me with this question because I'm not programer.

 

 // Get the product name
 $product_info_query_raw = "
	 select
	 pd.products_description,
	 pi.image
	 from
	 " . 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 );
 // Get the image information
 $image_size = getimagesize( DIR_WS_IMAGES . $product_info['image'] );

 

Regards

Andy

Edited by bolzebruce

Share this post


Link to post
Share on other sites

1. The TCPDF distribution now has the directories in a different order. You need to move the lang directory out of the examples directory and into the config directory. That should take care of the "missing" files and fix the fonts problem.

 

2. I don't know what field you are storing your large image info in, so I can't answer this. In any case, the images need to be large enough or this won't work anyway. See the Images section of the User's Manual for an explanation.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

First thanks for your great contribution.

I have a problem I do not quite find the solution. Only generates PDF in the default language in admin.

If a user changes the language for viewing the PDF keeps coming in the same preset language.

Is there any way to change this?

 

Thanks in advance

Share this post


Link to post
Share on other sites

It uses the language ID set on the page, so it should show in the correct language. Perhaps you have some other addon that is interfering with the language selection. If you have a link to your store I could try to figure this out.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Thanks for your testing. From my pc, just see it in the language that I have by default, I mean the Spanish. If such change to English as the default language, I see it in English ..... I imagine it may be a cache problem ....

 

Glad only be a problem from my pc. I appreciate your testing and your prompt response.

Share this post


Link to post
Share on other sites

Hoi,

 

i installed you fantastic script also, but got always english descriptions ?


SELECT signatur FROM dummesprueche WHERE forumsbezug > 0

Share this post


Link to post
Share on other sites

This addon passes the language variable from the product info page. If the page language is set to English, it will show a PDF in English. This works fine with a stock copy of osCommerce. If yours has been modified in some way that changes the language variable, you may see incorrect results.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hoi,

i downloaded it too and had several error (most solved).

But i cant solve the following error:

 

Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/users/tricon/www:/users/_temp/tricon) in /users/tricon/www/shop/ext/tcpdf/tcpdf.php on line 7916
Warning: imagejpeg() [function.imagejpeg]: Invalid 2nd parameter, it must a filename or a stream in /users/tricon/www/shop/ext/tcpdf/tcpdf.php on line 7917
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in /users/tricon/www/shop/ext/tcpdf/tcpdf.php on line 7979
TCPDF ERROR: Missing or incorrect image file:

 

Any idea ?


SELECT signatur FROM dummesprueche WHERE forumsbezug > 0

Share this post


Link to post
Share on other sites

The first error is caused by having a temp directory set that osCommerce cannot access. Search this forum for tmp directory and you should find some solutions.

 

The second error is apparently because you have no large image set for that product. Please read the User's Manual section on images.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello. i have install to my Osc v2.3.3.4 - i am getting this message when i click on the PDF icon to download the pdf file

 

Help me. please

 

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Share this post


Link to post
Share on other sites

That's a generic error message, which is no help at all. Ask your host where your PHP error log is, and check that for relevant errors.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

That's a generic error message, which is no help at all. Ask your host where your PHP error log is, and check that for relevant errors.

 

Regards

Jim

 

now i am getting this in my admin panel:

Warning: include(/hermes/bosweb25b/b350/ipg.omlshopcom/includes/languages/english/modules/pdf_datasheet/font_selector.php): failed to open stream: No such file or directory in /hermes/bosweb25b/b350/ipg.omlshopcom/admin/modules.php on line 129 Warning: include(): Failed opening '/hermes/bosweb25b/b350/ipg.omlshopcom/includes/languages/english/modules/pdf_datasheet/font_selector.php' for inclusion (include_path='.:/usr/local/lib/php-5.3.13/lib/php') in /hermes/bosweb25b/b350/ipg.omlshopcom/admin/modules.php on line 129

Share this post


Link to post
Share on other sites

Your product has no description and no image. Either one of those would cause the PDF to fail.

 

For your error message, there's no such file included in this package, nor is there any requirement for one. Did you make changes to the files in this addon package?

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

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

×