Jump to content
detsouvalas

PDF Catalog v.1.5

Recommended Posts

I've just installed this mod- all looks great so far, except Generate Catalog(s).  It gives me the following error:

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/www/shop.sparrowsnestonline.com/catalog/admin/includes/functions/database.php:13) in /home/www/shop.sparrowsnestonline.com/catalog/admin/includes/functions/database.php on line 13

 

**********************

 

I've figured out most of the errors, now (I think/hope! :'( ) My issue now is that when I click on my Generate Catalog(s) link in admin, it opens the page with a promt to click save in order to generate and save a catalog. I click the "save" button...computer seems to be thinking...then nothing. I expect that I should be getting some sort of success message, right? I don't think it's writing the pdf file.

 

Then when I go to the online catalog and click the Download Catalog link, I get this error message:

Warning: filesize(): Stat failed for pdf_catalogs/catalog_1.pdf (errno=2 - No such file or directory) in /home/www/shop.sparrowsnestonline.com/catalog/pdf_catalogue_info.php on line 89

 

I assume I've got something messed up in the generating process...Please help me, I'm going nuts :)

 

Jenni

Share this post


Link to post
Share on other sites

i get the error now

 

Fatal error: Maximum execution time of 60 seconds exceeded in /home/ashtekel/public_html/store/admin/pdf_gif.php on line 149

 

Using v1.56

 

mostly gifs (avg 15k)

150 products

increased execution time to 60 secs

 

any idea?

Share this post


Link to post
Share on other sites
I've figured out most of the errors, now (I think/hope! :'( )  My issue now is that when I click on my Generate Catalog(s) link in admin, it opens the page with a promt to click save in order to generate and save a catalog.  I click the "save" button...computer seems to be thinking...then nothing.  I expect that I should be getting some sort of success message, right?  I don't think it's writing the pdf file.

 

Then when I go to the online catalog and click the Download Catalog link, I get this error message:

Warning: filesize(): Stat failed for pdf_catalogs/catalog_1.pdf (errno=2 - No such file or directory) in /home/www/shop.sparrowsnestonline.com/catalog/pdf_catalogue_info.php on line 89

 

I assume I've got something messed up in the generating process...Please help me, I'm going nuts :)

 

Jenni

 

Yep, this is definately my biggest bump in the road so far. I simply cannot figure it out. If anyone can help me with this problem, I would be very pleased...I'm about to offer a bribe with bath products or candles... :D

 

I'm supposed to be running this site live as of tomorrow. If you need more info to help, please pm me.

 

Jenni

Share this post


Link to post
Share on other sites

I've come to the conclusion that it did does not support gifs :'(

 

But I've found a solution which may not please all of you but it works for me :thumbsup:

 

For every gif file you have, create a identical jpg file in the same location.

 

Then in the admin/pdf_catalogue.php file in the CategoriesListing function change it to this

 

if (strlen($print_catalog_array[$j]['image']) > 0) {
   //$imagepath=DIR_FS_CATALOG.DIR_WS_IMAGES.$print_catalog_array[$j]['image'];
   $ashTemp = DIR_FS_CATALOG.DIR_WS_IMAGES.$print_catalog_array[$j]['image'];
   $ashimg = substr($ashTemp, 0, strlen($ashTemp) - 4) . ".jpg";
   $imagepath = $ashimg;
} else {
   $imagepath=DIR_FS_CATALOG.DIR_WS_IMAGES.'/'.DEFAULT_IMAGE;
}

 

This will change the .gif extension of your files to .jpg.

Share this post


Link to post
Share on other sites

I have just installed PDF Catalogs v.1.5.8 for osCommerce v.2.2 MS2 and I am getting the following error message:

Warning: getimagesize(/home/advaitam/public_html/osc/images//osc/images/bkp041.jpg): failed to open stream: No such file or directory in /home/advaitam/public_html/osc/admin/pdf_fpdf.php on line 1475

FPDF error: Missing or incorrect image file: /home/advaitam/public_html/osc/images//osc/images/bkp041.jpg

 

Will some one help me to correct the image path. All the images are existing in this directory: osc/images/

 

Thanking you,

Share this post


Link to post
Share on other sites

Hi, I have installed the PDF catalogue on a site that uses the MaxiDVD WYSIGYG editor for HTML product descriptions. On some of the spaces in the text of the descriptions, " " is shown instead of an actual space on the printout of the PDF catalogue. What can be done to fix this?

Share this post


Link to post
Share on other sites

Hello all,

 

I've managed to get pdf catalogue to install but after the catalogue has been displayed and subsequently closed, the browser hangs and closes.

 

Im using IE 6.026 im just about to install netscape and firefox to see if this happens too but the most popular is IE so I need to resolve in any case.

 

It happens when I open other peoples catalogues too.

 

Any Ideas? It could just be specific to me and my particular computer so I would appreciate it if someone could check please.

 

url Gadgetsquick (site not yet live)

 

Thanks very much


The sooner you fall behind, the more time you'll have to catch up.

Share this post


Link to post
Share on other sites

It only happens in IE maybe time to upgrade my browser

 

Another question, Instead of the link opening up the browser how (& where) can I change the code so that when the link is clicked it gives the same option as if you right clicked on it to save?

 

Thanks to anyone who can get back to me on this


The sooner you fall behind, the more time you'll have to catch up.

Share this post


Link to post
Share on other sites

I've searched the forums and escpecially this thread up and down now, and i still havent found an answer to -where/how- do i add the product-attributes to the PDF ?

 

Neither pdf_config.php or pfd_catalogue.php mentions atributes with a single word :'(

 

We have a clothing-shop so it is kind of essential to have available colours, sizes etc mentioned :blink: heh

 

anyways, if anybody can help me or get me on the right way I'll be eternally grateful :rolleyes:

 

sincerely

vebj?rn

Share this post


Link to post
Share on other sites

Wondering if any expert knows how to fix this error:

 

Fatal error: Call to undefined function: tep_get_languages_directory() in /home/downdogs/public_html/admin/pdf_catalogue.php on line 562

 

 

I have just installed the PDF catalog contribution , latest version, and I am getting this error as I try to generate the catalog in the admin>tools screen.

 

 

Any help is appreciated,

 

Joel

Share this post


Link to post
Share on other sites

I tried asking about this before. It seems this contribution isn't compatible with HTML in the product descriptions (like the MaxiDVD WYSIWYG editor).

 

Who knows what can be done to make it compatible with HTML?

Share this post


Link to post
Share on other sites
:'( I've loaded the v1.56 and all works well when I don't show images but when I do I get this error.

Fatal error: Call to a member function on a non-object in /hsphere/local/home/swopno/nordicshopper.com/admin/pdf_fpdf.php on line 1596

 

I have both jpg & gif images. And a lot of them. Does this not handle gif?

:thumbsup: I was finally able to get mine to work. I changed pdf_fpdf.php about line 1596 to use $gif-> instead of $this->

 

I have over 700 products so it is really slow however:(

Share this post


Link to post
Share on other sites

So, does anybody know how to add attributes to this thing at all? without the possibility to show attributes this contribution is kind of useless for me :'(

Share this post


Link to post
Share on other sites

the instructions state to remove that function from languages

 

Wondering if any expert knows how to fix this error:

 

Fatal error: Call to undefined function: tep_get_languages_directory() in /home/downdogs/public_html/admin/pdf_catalogue.php on line 562

I have just installed the PDF catalog contribution , latest version, and I am getting this error as I try to generate the catalog in the admin>tools screen.

Any help is appreciated,

 

Joel


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites
Hi Guys,

 

I am getting time out errors when creating the pdf catalog, I dont have access to php.ini (at least I dont think I have).

 

How do I go about adding php function set_time_limit() and to which file do I need to add it to?

 

Please help as I really need this to work.

 

Thanks

 

Mark

 

Does anyone know the answer to this as I still have not sorted it out! :'(

 

Thanks

 

Mark :-"


Lifes a bitch, then you marry one, then you die!

Share this post


Link to post
Share on other sites

Hello everybody!

 

I have a little problem ... everything seems fine, my catalog is generated properly with one small but very important exception - images :(

 

I've installed very nice and useful contribution UltraPics:

http://www.oscommerce.com/community/contri...ons,1642/page,9

 

It of course changed something in how the images are stored and displayed... I'm not PHP guru to find the way out myself... maybe someone can help me? I'm sure it's not a big deal for someone knowing PHP :)

 

Regards,

 

Karol

 

P.S.

Great contribution!!!

Share this post


Link to post
Share on other sites

I can't edit my own post :/

 

So here's my next question: is it possible to choose not necessarily base currency as the one used to create PDF Catalog?

 

Regards,

 

TroLoo

Share this post


Link to post
Share on other sites
Hello everybody!

 

I have a little problem ... everything seems fine, my catalog is generated properly with one small but very important exception - images :(

 

I've installed very nice and useful contribution UltraPics:

http://www.oscommerce.com/community/contri...ons,1642/page,9

 

It of course changed something in how the images are stored and displayed... I'm not PHP guru to find the way out myself... maybe someone can help me? I'm sure it's not a big deal for someone knowing PHP :)

 

Regards,

 

Karol

 

P.S.

Great contribution!!!

 

 

 

I have the EXACT SAME PROBLEM. PDF, but no images in it. UltraPics is installed here.

 

I guess I'll start digging through the code, but would appreciate some help!

 

-= Dave =-

Share this post


Link to post
Share on other sites
I have the EXACT SAME PROBLEM.    PDF, but no images in it.  UltraPics is installed here.

 

I guess I'll start digging through the code, but would appreciate some help!

 

-= Dave =-

 

 

Well, it has nothing to do with Ultrapics, from what I can tell.

 

It acts as if it processes .jpgs successfully, but when I view the PDF file, the area where the images should display just shows the image border. And if I try making it process .gifs.... it will successfully process SOME of them. For others, the script will timeout after 30 seconds for some reason. This all is with image resizing turned off. (With resizing turned on, of course, you can't process .gif files at all, so the whole report comes up without product images, as it just won't process .jpgs right.)

 

I'm at a loss. I'm thinking about backing out my install and trying another contribution for PDF's.

 

If that doesn't work, I do recall integrating a particular free .php script into another application. This script was designed to take .html files and convert them to pdfs. Perhaps I could write a script to create a big .html file of the catalog... and then rig this .php script to run a convert on that in order to make the pdf.

 

I don't know. Sounds like fun, but I'm short on time this week.

 

 

-= Dave =-

Share this post


Link to post
Share on other sites
Well, it has nothing to do with Ultrapics, from what I can tell. 

Exactly ... I found the mistake. It's in "PDF Catalog" typo I guess.

 

File: pdf_fpdf.php

Function: _parsejpg($file) - around line 1472

 

The braces were wrong (it always took default image - a gif file inside _parsejpg function, should be like this:

 

$a=GetImageSize($file);

if(!$a) {

print('Missing or incorrect image file: '.$file);

$file=DIR_S_CATALOG.DIR_WS_IMAGES.DEFAULT_IMAGE;

}

 

Worked fine for me (took about 2h of debugging :( )

 

Greets!

Share this post


Link to post
Share on other sites

Can someone provide a link to a site that has this contrib working so that I can see what it looks like up and running?

 

Thanks,

Jason

 

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://forums.oscommerce.com/index.php?showtopic=49804&st=0

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

Share this post


Link to post
Share on other sites
Exactly ... I found the mistake. It's in "PDF Catalog" typo I guess.

 

File: pdf_fpdf.php

Function: _parsejpg($file) - around line 1472

 

The braces were wrong (it always took default image - a gif file inside _parsejpg function, should be like this:

 

$a=GetImageSize($file);

if(!$a) {

  print('Missing or incorrect image file: '.$file);

  $file=DIR_S_CATALOG.DIR_WS_IMAGES.DEFAULT_IMAGE;

}

 

Worked fine for me (took about 2h of debugging :( )

 

Greets!

 

 

Wow!! You're fantastic !!

 

Thanks tons for locating this ! You have really made my day ! Hours and hours of work instantly saved !

 

 

Thank you so much!!!

 

-= Dave =-

Share this post


Link to post
Share on other sites

Fantastic contrib, works a treat. If anybody wants to see it in action, it's here. One thing i do have to say though, the install doc is a bit ... patchy :D

 

Anyhow, i got it workin fine, but i think i've also found a bug :)

If you enable

	//Show or not the new products (0 = no, 1 = yes)
define('SHOW_NEW_PRODUCTS',0);

in pdf_config.php, then it gives you the following error when trying to create a catalog.

FPDF error: Image file has no extension and no type was specified: C:/apache2triad/htdocs/oscom/images/

 

I'm not even sure what the SHOW_NEW_PRODUCTS feature does, but it would be nice to have a lk ;).

 

On another note, i want to know if it's possible to modify the actual layout of the pdf contents. Say, if i wanted to add a page background, or move the content around?

 

Any ideas on how i'd go about doin this, assuming it's possible :D

 

Cheers

Fatmcgav

Share this post


Link to post
Share on other sites
Anyhow, i got it workin fine, but i think i've also found a bug :)

It works fine for me... You may have the mistake I mentioned before.

 

What it does :) It creates some pages with newly added products (the same as new product on main page) at the beginning of product list.

 

TroLoo

Share this post


Link to post
Share on other sites
It works fine for me... You may have the mistake I mentioned before.

 

What it does :) It creates some pages with newly added products (the same as new product on main page) at the beginning of product list.

 

TroLoo

Hmm, thats strange - i've added ure code change already, and it was still givin me the error. This is what my code looks like around '_parsejpg($file)'.

function _parsejpg($file)
{
//Extract info from a JPEG file
 $a=GetImageSize($file);
if(!$a) {
print('Missing or incorrect image file: '.$file);
$file=DIR_S_CATALOG.DIR_WS_IMAGES.DEFAULT_IMAGE;
}

 

Any ideas?

 

Cheers

Fatmcgav

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

×