Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PDF Catalog v.1.5


Recommended Posts

Hi!

 

I just uploaded a small upgrade of the PDF Catalog contribution.

 

Here's the list of the changes:

- Upgraded FPDF Class to FPDF v.1.52 released 2003-12-30,

- Added partial GIF support to the Contribution,

- Added background color to generated PDF files,

- Adapted the administration page to osCommerce template,

- Changed a bit the page displayed in the osCommerce catalog.

 

I hope it works for you as well! ;)

 

The new version can be found here:

http://www.oscommerce.com/community/contributions,908

 

Old forum posts regarding PDF Catalog:

http://www.oscommerce.com/forums/index.php?showtopic=49804&st=0

http://www.oscommerce.com/forums/index.php?showtopic=35851&st=0

Edited by detsouvalas

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

  • Replies 504
  • Created
  • Last Reply

Top Posters In This Topic

A little error on pdf_catalogue. You have forget a ].


Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

 

Link to comment
Share on other sites

i uploaded it and get this error on the catalog side of my site when i click the pdf catalog link

 

Warning: filesize(): Stat failed for pdf_catalogs/rainflower_1.pdf (errno=2 - No such file or directory) in /home/xxxx/public_html/pdf_catalogue_info.php on line 71
pdf_catalogs/rainflower_1.pdf (0.00 Mo)

 

i'm not good at all with php, so any help is appreciated :)

Link to comment
Share on other sites

A little error on pdf_catalogue. You have forget a ].

 

Could you please give me some more details? Who? Where? What?

 

Thanx in advance!

 

 

i uploaded it and get this error on the catalog side of my site when i click the pdf catalog link

 

Sorry, I forgot to undo some hardcoded customizations!! :unsure:

 

I will upload the fixes! Thanx for your patience!

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Warning: filesize(): Stat failed for pdf_catalogs/rainflower_1.pdf (errno=2 - No such file or directory) in /home/xxxx/public_html/pdf_catalogue_info.php on line 71

pdf_catalogs/rainflower_1.pdf (0.00 Mo)

 

I had the same problem.

 

1. Rename the directory you created under /catalog/ from "catalogues" to "pdf_catalogs"

 

2. Open catalog/admin/pdf_config.php

 

Go to around line 29 and change

 

define('DIR_WS_PDF_CATALOGS','../catalogues/');

 

to

 

define('DIR_WS_PDF_CATALOGS','../pdf_catalogs/');

 

3. Go to your Admin panel. Select Tools => Generate catalog. This will generate catalogs in your /pdf_catalogs/ folder. The default is osCommerce_1.pdf, osCommerce_2.pdf, etc.

 

4. Open catalog/pdf_catalogue_info.php.

 

Line 70 should look like this:

 

$file = "pdf_catalogs/rainflower_" . $languages_id . ".pdf";

 

change it to:

 

    $file = "pdf_catalogs/osCommerce_" . $languages_id . ".pdf";

 

You can change the prefix of your pdf catalogs by going to catalog/admin/pdf_config.php and changing line 35, which is currently:

 

  define('PDF_FILENAME','osCommerce');

 

Change the osCommerce to what suits you and put the same value in the change on step 4.

 

Line 375 in catalog/admin/pdf_catalogue.php should be

 

$heightwidth=getimagesize($data_array[12]);

 

 

One question I have is why does it generate 3 .pdf files through admin and only display one to download?

 

Carla

Link to comment
Share on other sites

Also, I tried turning Resize Images off and on to no avail....

 

 

FROM README.TXT

>> KNOWN ISSUES:

 

If you are using GIF files, setting in the configuration the 'Resize images'

option to '1' (1 = yes) will generate an error!

Link to comment
Share on other sites

Hello,

 

I have the error below when I try to generate the PDF file :

 

FPDF error: Image file has no extension and no type was specified: /home....

 

Can someone help me ?

 

Thanks in advance

Link to comment
Share on other sites

Johnny,

 

I didn't run into that error when I installed is and I'm not a php expert, so I really couldn't tell you what is causing it. Hopefully the author of the contribution will be able to help you.

 

Smevo,

 

I found a similar post in another thread on an older version.

 

hi we had a similar problem, it was that it did not support .bmp files - only liked .jpg files - also did not like any image name with a space in it. We now have a problem in that we have corrected all the images but it does not handle a large number of products and times out.. good luck

 

BoulderDash,

 

The contribution is working for me now that I made the changes in my previous post. I haven't installed any contributions that modify the product images, so maybe that is why I'm not running into the problems that other people have.

 

The contribution is pretty compartmentalized. If you installed it and it didn't work, you could just remove the "Download Catalog" link from your information page on the storefront until you resolved the issues and it wouldn't affect anything else.

 

Carla

Link to comment
Share on other sites

Hello everybody!

 

Well, as I don't want to upload another version in the contribution's area before it is tested by others, you can download an updated version of PDF Catalogs from here. If I get no feedback about errors, I will upload it in the contribution's area on Sunday!

 

The filename and the directory issues should have been settled, you can configure them as you like in the pdf_config.php and in the pdf_catalogue_info.php files.

 

Line 375 in catalog/admin/pdf_catalogue.php should be

$heightwidth=getimagesize($data_array[12]);

 

This issue, also posted in older forum posts, was beyond the first ones that was addressed, I ckecked again the code and it seems OK to me! :unsure:

 

One question I have is why does it generate 3 .pdf files through admin and only display one to download?

 

The script generates one PDF file for each installed language and displays in the shop the link to the file matching the current language.

 

FPDF error: GIF parser: unable to open +path_to_file_name

 

Well that one seems to be an error in the GIF extension of FPDF Class, I am not the auther of the above mentionned class, but I will have a look in the fpdf.org forum and see if a can find any clues ... !

 

FPDF error: Image file has no extension and no type was specified:

 

This error used to appear when images where not of the right format!

Supported image formats are JPG, PNG and (partially) GIF.

 

I also wanted to say I am sorry for not informing the author of the PDF Catalog script about the modifications I made ... ! :ph34r:

Edited by detsouvalas

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Dear,

thanks for your pdf catalog's contribute. I've one question for you.

Is possible add to end of catalog also option values (order by categories)?

 

Example:

 

--+------------------------------------+-----------------

CATEGORIE a

--+------------------------------------+-----------------

| PRODUCT NAME x PRICE

--+------------------------------------+-----------------

1 Name Option 1 + 5,00 $

--+------------------------------------+-----------

2 Name Option 2 + 12,00 $

--+------------------------------------+-----------

3 Name Option 3 + 7,00 $

--+------------------------------------+-----------

| PRODUCT NAME y PRICE

--+------------------------------------+-----------

1 Name Option 1 + 3,00 $

--+------------------------------------+-----------

2 Name Option 2 + 56,00 $

--+------------------------------------+-----------

3 Name Option 3 + 32,00 $

--+------------------------------------+-----------

ecc.

--+------------------------------------+-----------

 

 

 

--+------------------------------------+-----------

CATEGORIE b

--+------------------------------------+-----------

| PRODUCT NAME k PRICE

--+------------------------------------+-----------

1 Name Option 1 + 3,00 $

--+------------------------------------+-----------

2 Name Option 2 + 56,00 $

--+------------------------------------+-----------

3 Name Option 3 + 32,00 $

--+------------------------------------+-----------

ecc.

--+------------------------------------+-----------

 

 

 

Thanks.

Link to comment
Share on other sites

Hello!

 

Just to make one thing clear, the author of PDF_Catalog Contribution was Mr. Gurvan Riou, I just make some modifications based on my needs and on certain old forum messages! :)

 

Is possible add to end of catalog also option values (order by categories)?

 

I suppose that one can add almost everything saved in the database! Wouldn't it be more suitable to add the options underneath the product??

 

BTW, have you tried the latest version? Did you had any problems (whatever, installation, writing errors, .... everything!)?

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Hello,

if some images files are not present the pdf generation hangs,

 

I have added the:

 

if (is_file("$data_array[12]")) {

 

before line 369 in pdf_catalogue.php to fix this

 

here is the code:

 

if (is_file("$data_array[12]")) {
$heightwidth=getimagesize($data_array[12]);
$data_array[0]=$data_array[0];
$data_array[1]=$heightwidth[1]*PDF_TO_MM_FACTOR;
$this->ShowImage($data_array[0],$data_array[1],$link,$data_array[12]);
$y1=$this->GetY();
}

 

Ciao!

Link to comment
Share on other sites

Fatal error: Maximum execution time of 30 seconds exceeded in /home/alfaow/public_html/store/admin/pdf_gif.php on line 164

 

How many products do you have?

What's the average size of your images?

How many languages do you have?

 

This script needs time to execute and compile the PDF file. PHP allows by default each script a maximun execution time of 30 seconds.

You can change this setting somewhere in the php.ini, but I don't know where this file is on your server, don't you have a search file function available??

Before changing this setting, please read the PHP documentation and understand what such a change implies for your system!

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Hi-

 

When generating, Im still getting this...

 

FPDF error: Image file has no extension and no type was specified: /home/servername/public_html/images/

 

I uploaded v.151 and Im still getting errors. I dont have anything in the /images dir besides jpegs and gifs.

 

Anyone else?

Link to comment
Share on other sites

Fatal error: Maximum execution time of 30 seconds exceeded in /home/alfaow/public_html/store/admin/pdf_gif.php on line 164

 

How many products do you have?

What's the average size of your images?

How many languages do you have?

 

This script needs time to execute and compile the PDF file. PHP allows by default each script a maximun execution time of 30 seconds.

You can change this setting somewhere in the php.ini, but I don't know where this file is on your server, don't you have a search file function available??

Before changing this setting, please read the PHP documentation and understand what such a change implies for your system!

Hi there,

 

firstly, thanks for rersponding, I have only 800 products and my image sizes are actually very low, avergare seems to be 15kb.

 

I click build pds etc.... it appears to be working, then just times out.

 

I have a mixture of gifs and jpg images btw.

 

thanks you again

Link to comment
Share on other sites

Hello everyone, I just uploaded the module pdf_catalog v1.51 and I did all steps that needed but the error on a admin/tool page appears

 

Parse error: parse error, unexpected '}' in /usr/local/psa/home/vhosts/mediaversion.com/httpdocs/catalog/admin/includes/boxes/tools.php on line 34

 

 

also on catalog/

Parse error: parse error, unexpected T_NEW in /usr/local/psa/home/vhosts/mediaversion.com/httpdocs/catalog/includes/boxes/information.php on line 28

 

Any help I would appreciate very much

Goran

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