Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon] PDF Datasheet


kymation

Recommended Posts

Your code, as posted above:

 

// Get the PDF language and config files
 require_once( '/ext/tcpdf/config/lang/eng.php' );
 require_once( '/ext/tcpdf/tcpdf.php' );

 

Code from the distribution package:

 

  // Get the PDF language and config files
 require_once( 'ext/tcpdf/config/lang/eng.php' );
 require_once( 'ext/tcpdf/tcpdf.php' );

 

See the difference?

 

Regards

Jim

 

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_PDF_DATASHEET_INITIALIZE_TITLE_ITALIAN in /web/htdocs/www.footballshirtstar.com/home/includes/modules/pdf_datasheet/pd_initialize.php on line 59
Warning: constant() [function.constant]: Couldn't find constant MODULE_PDF_DATASHEET_INITIALIZE_SUBJECT_ITALIAN in /web/htdocs/www.footballshirtstar.com/home/includes/modules/pdf_datasheet/pd_initialize.php on line 66
Warning: constant() [function.constant]: Couldn't find constant MODULE_PDF_DATASHEET_INITIALIZE_KEYWORDS_ITALIAN in /web/htdocs/www.footballshirtstar.com/home/includes/modules/pdf_datasheet/pd_initialize.php on line 72
Warning: constant() [function.constant]: Couldn't find constant MODULE_PDF_DATASHEET_HEADER_TEXT_ITALIAN in /web/htdocs/www.footballshirtstar.com/home/includes/modules/pdf_datasheet/pd_header.php on line 66
Notice: getimagesize() [function.getimagesize]: Read error! in /web/htdocs/www.footballshirtstar.com/home/includes/modules/pdf_datasheet/pd_description.php on line 54
TCPDF ERROR: [image] Unable to get image: images/
Fatal error: Call to a member function store() on a non-object in /web/htdocs/www.footballshirtstar.com/home/includes/modules/ultimate_seo_urls5/main/usu5.php on line 78

 

 // Get the PDF language and config files
 require_once( 'ext/tcpdf/config/lang/eng.php' );
 require_once( 'ext/tcpdf/tcpdf.php' );

 

the difference... more error....

Link to comment
Share on other sites

Then you have more problems. Are your Italian language files in a directory named italian? Since you changed the above code, what else did you change?

 

Regards

Jim

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

Link to comment
Share on other sites

Then you have more problems. Are your Italian language files in a directory named italian? Since you changed the above code, what else did you change?

 

Regards

Jim

 

I followed the instructions on the pdf step by step I tried to change and put the Italian language in the two strings to line 212 but nothing ....

All things considered contribution is quite simple to install does not understand why it no works.

I also read the previous posts but nothing .... I do not understand.

Link to comment
Share on other sites

Did you install the Italian language after you installed the PDF modules? If you did, remove and reinstall the PDF modules.

 

Regards

Jim

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

Link to comment
Share on other sites

Did you install the Italian language after you installed the PDF modules? If you did, remove and reinstall the PDF modules.

 

Regards

Jim

 

I have installed many contributions including the Italian language in the end your contribution.

Link to comment
Share on other sites

I will

thanks

 

 

install fresh new website no changes except for seo tags I've added the Italian language and then the contribution to print pdf

nothing ...... or have something wrong or is there something else

this contribution is too complicated for me

and maybe it too unstable and not enough compatible .... I do not know ....

I'm sorry!

thanks too

LC

 

 

http://www.firstcellular.co.uk/product_info.php?products_id=29

 

 

Notice: Undefined variable: has_list_price in /web/htdocs/www.firstcellular.co.uk/home/includes/modules/pdf_datasheet/pd_image_price.php on line 133 Notice: Use of undefined constant TEXT_YOUR_PRICE - assumed 'TEXT_YOUR_PRICE' in /web/htdocs/www.firstcellular.co.uk/home/includes/modules/pdf_datasheet/pd_image_price.php on line 274 Fatal error: Call to undefined function tep_get_products_attributes() in /web/htdocs/www.firstcellular.co.uk/home/includes/modules/pdf_datasheet/pd_image_price.php on line 314

Edited by luigicosta
Link to comment
Share on other sites

Install only the basic modules, as listed in the User's Manual section 3.5. Read the manual for compatibility information before installing any of the other modules -- some of those require other Addons to work.

 

I'm going to remove the optional modules if people don't stop installing them without reading the instructions.

 

Regards

Jim

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

Link to comment
Share on other sites

Install only the basic modules, as listed in the User's Manual section 3.5. Read the manual for compatibility information before installing any of the other modules -- some of those require other Addons to work.

 

I'm going to remove the optional modules if people don't stop installing them without reading the instructions.

 

Regards

Jim

 

 

ok, something starts to work ....

although I have only a blank page .....

:sweating:

Edited by luigicosta
Link to comment
Share on other sites

Not at all blank. I'm seeing the header, product name, model number, price, and manufacturer. There is no large image or description, so of course those are blank. In other words, this is exactly what you should be seeing for that page.

 

Regrds

Jim

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

Link to comment
Share on other sites

Hi Jim,

Someday i installed your add-ons but i have some bug can you look and help me

Notice: Constant HEADER_TAGS_DISPLAY_COLUMN_BOX already defined in /home/emc/domains/emcmoda.pl/public_html/sklep/pdf_datasheet.php on line 66
Notice: Constant HEADER_TAGS_DISPLAY_HELP_POPUPS already defined in /home/emc/domains/emcmoda.pl/public_html/sklep/pdf_datasheet.php on line 66
Notice: Constant HEADER_TAGS_DIABLE_PERMISSION_WARNING already defined in /home/emc/domains/emcmoda.pl/public_html/sklep/pdf_datasheet.php on line 66
Notice: Constant HEADER_TAGS_DISPLAY_SILO_BOX already defined in /home/emc/domains/emcmoda.pl/public_html/sklep/pdf_datasheet.php on line 66
Notice: Constant HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS already defined in /home/emc/domains/emcmoda.pl/public_html/sklep/pdf_datasheet.php on line 66
Notice: Constant HEADER_TAGS_ENABLE_EDITOR_CATEGORIES already defined in /home/emc/domains/emcmoda.pl/public_html/sklep/pdf_datasheet.php on line 66
Notice: Constant HEADER_TAGS_ENABLE_VERSION_CHECKER already defined in /home/emc/domains/emcmoda.pl/public_html/sklep/pdf_datasheet.php on line 66
Fatal error: Call to undefined function tep_session_save_path() in /home/emc/domains/emcmoda.pl/public_html/sklep/includes/languages/polish.php on line 335

http://sklep.emcmoda.pl/pdf_datasheet.php?products_id=239&language=polish

 

BR

Michal

Link to comment
Share on other sites

None of those errors have anything to do with this Addon. The first seven appear to be an incorrectly installed Header Tags addon. You have apparently run an install SQL statement twice. You need to remove the duplicate entries from your database.

 

The last error says that the definition of tep_session_save_path is missing. It should be the last function in catalog/includes/functions/sessions.php. This could be caused by replacing that file with an older version. Get the correct version from your backup or from a stock copy of osCommerce.

 

Regards

Jim

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

Link to comment
Share on other sites

Hi Jim

 

Header Tags I fix but last bug beside replacing file didn't help

 

when in file catalog\include\language\polish.php comment

utworzony katalog.');
//define('WARNING_SESSION_DIRECTORY_NOT_WRITEABLE', 'Ostrzeżenie: Nie ma możliwości zapisu do katalogu sesji: ' . tep_session_save_path() . '. Sesje nie będą działać dopóki nie zostaną ustawione właściwe uprawnienia dla tego katalogu.');
//define('WARNING_SESSION_AUTO_START', 'Ostrzeżenie: Parametr session.auto_start jest aktywny - zablokuj go zmieniając konfigurację pliku php.ini i zrestartuj serwer www.');

 

i have another errors

Notice: Constant BOX_HEADING_TELL_A_FRIEND already defined in /home/emc/domains/emcmoda.pl/public_html/sklep/includes/languages/polish.php on line 386
Notice: Constant BOX_TELL_A_FRIEND_TEXT already defined in /home/emc/domains/emcmoda.pl/public_html/sklep/includes/languages/polish.php on line 387
Notice: Constant TEXT_SEE_MORE already defined in /home/emc/domains/emcmoda.pl/public_html/sklep/includes/languages/polish.php on line 410
Warning: require_once(ext/tcpdf/config/lang/eng.php) [function.require-once]: failed to open stream: No such file or directory in /home/emc/domains/emcmoda.pl/public_html/sklep/pdf_datasheet.php on line 212
Fatal error: require_once() [function.require]: Failed opening required 'ext/tcpdf/config/lang/eng.php' (include_path='.:/usr/local/lib/php') in /home/emc/domains/emcmoda.pl/public_html/sklep/pdf_datasheet.php on line 212

 

 

but i can't find this file :/

Warning: require_once(ext/tcpdf/config/lang/eng.php) [function.require-once]: failed to open stream: No such file or directory in /home/emc/domains/emcmoda.pl/public_html/sklep/pdf_datasheet.php on line 212

Link to comment
Share on other sites

For your last error: ext/tcpdf/config/lang/eng.php is included with the TCPDF package. I don't understand how you missed that one. Upload it again.

 

The rest of your errors are not related to this Addon. They appear to be constants that are defined twice. Look in the file where the error message tells you and delete the extra. If you need more help with these, please post a request in the general forum.

 

Regards

Jim

Edited by kymation

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

Link to comment
Share on other sites

  • 5 weeks later...

I love this addon

 

I have read the tutorials on tcpdf.org and made some changes I wanted.

But I have one small problem I hav ent found a solution to yet;

 

If i want to add a backgroundcolor to the heading, where can I do that?

On a clean file I can use eg. SetFillColor to add a backgroundcolor to a cell, but not to the header.

Any one have an idea?

Link to comment
Share on other sites

I can think of two ways to do this:

 

1. Use a graphic for the entire header. Make it wide enough to fill the entire header, and turn off all other header content.

 

2. Create a custom header. The stock header is limited in what it will do, but you can override it with your own custom header. Then you can put in whatever you want. There is some mention of this in the TCPDF code.

 

Regards

Jim

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

Link to comment
Share on other sites

I can think of two ways to do this:

 

1. Use a graphic for the entire header. Make it wide enough to fill the entire header, and turn off all other header content.

 

2. Create a custom header. The stock header is limited in what it will do, but you can override it with your own custom header. Then you can put in whatever you want. There is some mention of this in the TCPDF code.

 

Regards

Jim

 

Sometimes the simpliest is the best solution, I added a background image the the wholepage, in that way I easily can change colors and layout on footer and header.

 

To add a background image: (info from tcpdf.com)

 

in pdf_datasheet.php

find:

$pdf = new TCPDF( PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false );

 

change to:

// Extend the TCPDF class to create custom Header and Footer
class MYPDF extends TCPDF {
   //Page header
   public function Header() {
    // get the current page break margin
    $bMargin = $this->getBreakMargin();
    // get current auto-page-break mode
    $auto_page_break = $this->AutoPageBreak;
    // disable auto-page-break
    $this->SetAutoPageBreak(false, 0);
    // set bacground image
    $img_file = K_PATH_IMAGES.'images/system/pdf_background.jpg';
    $this->Image($img_file, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0);
    // restore auto-page-break status
    $this->SetAutoPageBreak($auto_page_break, $bMargin);
    // set the starting point for the page content
    $this->setPageMark();
   }
}
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
//$pdf = new TCPDF( PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false );

 

Remember to add the correct path to your image in this row -> $img_file = K_PATH_IMAGES.'images/system/pdf_background.jpg';

Link to comment
Share on other sites

  • 2 weeks later...

Hello Jim,

Today I download the pdf Datasheet, I installed without problems. I see the icon on the product properly but when I click it I get this result:

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_PDF_DATASHEET_INITIALIZE_TITLE_ITALIAN in /web/htdocs/www.mecpad.it/home/store/includes/modules/pdf_datasheet/pd_initialize.php on line 59

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_PDF_DATASHEET_INITIALIZE_SUBJECT_ITALIAN in /web/htdocs/www.mecpad.it/home/store/includes/modules/pdf_datasheet/pd_initialize.php on line 66

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_PDF_DATASHEET_INITIALIZE_KEYWORDS_ITALIAN in /web/htdocs/www.mecpad.it/home/store/includes/modules/pdf_datasheet/pd_initialize.php on line 72

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_PDF_DATASHEET_HEADER_TEXT_ITALIAN in /web/htdocs/www.mecpad.it/home/store/includes/modules/pdf_datasheet/pd_header.php on line 66

TCPDF ERROR: [image] Unable to get image: /web/htdocs/www.mecpad.it/home/store/ext/tcpdf/images/images/store_logo.png

Fatal error: Call to a member function store() on a non-object in /web/htdocs/www.mecpad.it/home/store/includes/modules/ultimate_seo_urls5/main/usu5.php on line 78

 

Can you help me please?

Link to comment
Share on other sites

Hello Jim,

Today I download the pdf Datasheet, I installed without problems. I see the icon on the product properly but when I click it I get this result:

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_PDF_DATASHEET_INITIALIZE_TITLE_ITALIAN in /web/htdocs/www.mecpad.it/home/store/includes/modules/pdf_datasheet/pd_initialize.php on line 59

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_PDF_DATASHEET_INITIALIZE_SUBJECT_ITALIAN in /web/htdocs/www.mecpad.it/home/store/includes/modules/pdf_datasheet/pd_initialize.php on line 66

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_PDF_DATASHEET_INITIALIZE_KEYWORDS_ITALIAN in /web/htdocs/www.mecpad.it/home/store/includes/modules/pdf_datasheet/pd_initialize.php on line 72

 

Warning: constant() [function.constant]: Couldn't find constant MODULE_PDF_DATASHEET_HEADER_TEXT_ITALIAN in /web/htdocs/www.mecpad.it/home/store/includes/modules/pdf_datasheet/pd_header.php on line 66

TCPDF ERROR: [image] Unable to get image: /web/htdocs/www.mecpad.it/home/store/ext/tcpdf/images/images/store_logo.png

Fatal error: Call to a member function store() on a non-object in /web/htdocs/www.mecpad.it/home/store/includes/modules/ultimate_seo_urls5/main/usu5.php on line 78

 

Can you help me please?

 

I add that I installed the Italian packages as listed in the User's Manual section 2.2.2

and only the basic modules, as listed in the User's Manual section 3.5.

 

Help please :unsure:

 

 

EDIT:

Yes, I have a folder named italian containing my language files

and i have installed this modules:

  • Initialize Module
  • Header Module
  • Fonts Module
  • Title Module
  • Description Module
  • Product Page Link Module

Edited by flane
Link to comment
Share on other sites

That's a bug. I thought I had all of the language bugs fixed, but apparently I missed a few.

 

In all of the files in includes/modules/pdf_datasheet/ find the following code

 

	    $this->languages_array[$this_language['id']] = $this_language['name'];

 

and replace it with this

 

	    $this->languages_array[$this_language['id']] = $this_language['directory'];

 

This code appears in multiple locations in several files, so it's best to search for it and replace it where you find it. Once you have it replaced, remove the modules and reinstall them.

 

Thanks for the bug report. I'll issue a revised copy as soon as I have the time.

 

Regards

Jim

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

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