Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Thumbnail PDF Catalogue


Vger

Recommended Posts

That error means that you don't have a field in your 'products' table (in your database) for 'products_id' - and that has absolutely nothing to do with this contribution.

 

Those are my final words on the subject.

 

Vger

 

yes, there are in my database. so. but i drive with the new mysql 5.1.

 

But wish i don't have the is my database, will the shop not work, so yes, the product is in the database.

 

But you will not help with you own script, damn, why you so in the readme file, write to this post ???

Edited by TheExterminator
Link to comment
Share on other sites

  • Replies 229
  • Created
  • Last Reply

Top Posters In This Topic

When generating the PDF I get the following error:

 

Fatal error: Cannot access empty property in C:\apachepub\shop.xxxx.be\admin\pdf_catalogue.php on line 618

 

617		 //recherche le nom de la categorie pere
618			$this->$parent_category_name='';
619			$this->ParentsName($current_category_level,$i,$categorieslevelsarray, $categoriesnamearray);

 

What can be wrong?

 

Hi,

 

the error is the $:

 

 

618 $this->$parent_category_name='';

 

The correct line is:

 

618 $this->parent_category_name='';

 

This error occures on many lines - a little bit dirty coding ;)

 

Best regards.

Michael

Link to comment
Share on other sites

This error occures on many lines - a little bit dirty coding

 

Thanks for pointing that out. I have now been back through that file and can only find that one instance of the improper use of the variable. If you can see any more then please point them out to me.

 

Perhaps I should explain that what happened with this contribution was that I amalgamated two seperate contributions, the original Thumbnail PDF Catalog and Auto-Thumbnailer. What I did then was to add some code which stripped out the sub-directory paths when carrying images from the main images folder and its sub-folders to the imagecache folder. So, an image that was listed as being in images/microsoft/ in the database is pulled from the database but put in the imagecache folder without the need of duplicating the sub-folder structure. This was essential for the two contributions to work together successfully. The 'dirty coding' you refer to was/is part of the original PDF Catalog contribution.

 

I will update the contribution tomorrow, so if you know of any other errors I'd be pleased if you point them out to me.

 

But you will not help with you own script, damn, why you so in the readme file, write to this post ???

 

The responses you see in this thread are only a small part of the responses that I give - many of them being by direct PM to me. The problem you outlined has never been reported before, and it seems now that it only occurs when people are using MySQL 5+. There are many problems with php scripts and MySQL 5, and very few hosting companies use MySQL 5 for this very reason.

 

Vger

Link to comment
Share on other sites

  • 2 weeks later...

Vger,

 

love this contrib - thanks! I only have one thing I'm trying to figure out. After the pdf is generated, it works great and looks great; however, all double quotes and extra spaces appear as their html counterpart. See below to see what I mean:

 

"One thing I ask of the Lord, this is what I seek: that I may dwell in the house of the Lord all the days of my life, to gaze upon the beauty of the Lord and to seek him in his temple. Hear my voice when I call, O Lord; be merciful to me and answer me.  My heart says of you, 'Seek his face!' Your face, Lord, I will seek."  Psalm 24:4,7-8

 

Any help would be greatly appreciated :D

Link to comment
Share on other sites

Vger,

 

love this contrib - thanks! I only have one thing I'm trying to figure out. After the pdf is generated, it works great and looks great; however, all double quotes and extra spaces appear as their html counterpart. See below to see what I mean:

 

"One thing I ask of the Lord, this is what I seek: that I may dwell in the house of the Lord all the days of my life, to gaze upon the beauty of the Lord and to seek him in his temple. Hear my voice when I call, O Lord; be merciful to me and answer me.? My heart says of you, 'Seek his face!' Your face, Lord, I will seek."? Psalm 24:4,7-8

 

Any help would be greatly appreciated :D

 

 

I figured it out:

 

Find line 650 in pdf_catalogue.php in admin:

$description=rtrim(strip_tags($print_catalog_array[$j]['description']));

 

Change to:

$char=array("?", """);

$charto=array(" ", "\"");

$description=rtrim(strip_tags(str_replace($char, $charto, $print_catalog_array[$j]['description'])));

 

 

I still haven't figured out how to make line breaks "<br>" to carry over to the pdf yet though.

 

Scott

Link to comment
Share on other sites

Let's try that again:

 

Find line 650 in pdf_catalogue.php in admin:

$description=rtrim(strip_tags($print_catalog_array[$j]['description']));

 

Change to:

					$char=array(" ", """, "<br />");
				$charto=array(" ", "\"", "break;");
				$description=rtrim(strip_tags(str_replace($char, $charto, $print_catalog_array[$j]['description'])));

 

Thanks. If anyone know the fix to convert html line breaks to pdf, please post or pm me.

 

Scott

Link to comment
Share on other sites

If I'd just read my post more closely... the last one included my failed attempt to hack in line breaks.

 

Let's try that again:

 

In catalog/admin/pdf_catalogue.php search for (around line 650):

$description=rtrim(strip_tags($print_catalog_array[$j]['description']));

 

Change to:

					$char=array("?", """);
				$charto=array(" ", "\"");
				$description=rtrim(strip_tags(str_replace($char, $charto, $print_catalog_array[$j]['description'])));

 

Thanks. If anyone know the fix to convert html line breaks to pdf, please post or pm me.

 

Scott

Link to comment
Share on other sites

OK, sound the trumpets!

 

To convert the html for spaces, quotes, and line breaks to your PDF:

 

In catalog/admin/pdf_catalogue.php search for (around line 650):

$description=rtrim(strip_tags($print_catalog_array[$j]['description']));

 

Change to:

					$char=array("?", """, "<br />");
				$charto=array(" ", "\"", "\n\r");
				$description=rtrim(strip_tags(str_replace($char, $charto, $print_catalog_array[$j]['description'])));

 

Hope this helps a few hundred of you out.

 

Scott

Link to comment
Share on other sites

Again - because the editor keeps converting the code.

 

OK, sound the trumpets!

 

To convert the html for spaces, quotes, and line breaks to your PDF:

 

In catalog/admin/pdf_catalogue.php search for (around line 650):

$description=rtrim(strip_tags($print_catalog_array[$j]['description']));

 

Change to:

					$char=array(" ", """, "<br />");
				$charto=array(" ", "\"", "\n\r");
				$description=rtrim(strip_tags(str_replace($char, $charto, $print_catalog_array[$j]['description'])));

 

Hope this helps a few hundred of you out.

 

Scott

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

i have a problem.

In my catalog the products are presents in sub-cat and linked into the primary category.

 

When i create the pdf catalog the file present the products in category and the products in sub-category.

i want view only the products in sub category. It's possible?

:(

 

sorry for my bad english :-"

Link to comment
Share on other sites

Im having a problem getting the Thumbnail PDF Catalogue to display columns (As in 4-5 products per line, as opposed to 1 product a line), I have tried various things to the php_catalouge.php file to change this, but none have worked so far. I was wondering if anyone could help me out in solving this issue.

 

Much appreciated,

 

Jay

Edited by recoilx
Link to comment
Share on other sites

There is no facility within the programme to do that.

 

Vger

 

Thanks anyway, I was just wondering if you (or anyone else) could shed some light on how to go about doing it. I have made some progress on it however, ( I combined it with a few other scripts, when it's complete i'll be more than happy to share it with the community).

 

I'll post later in regards to it,

 

Jay

Link to comment
Share on other sites

That's not this contribution you are using. I only answer questions on my own Thumbnail PDF Catalogue contribution.

 

Vger

 

Is This Not From You : Thumbnail PDF Catalogue v2.0_1.zip ????? Is This I Have Install Today. Is From Yours "My Contributions"

Edited by TheExterminator
Link to comment
Share on other sites

Every one of your images begins with this code:

 

http://the-exterminator.dk/webshop15/imagemagic.php?

 

imagemagic has nothing to do with my contribution.

 

Vger

 

Yes, i have imagemagic on the shop to. but i install you pdf and is nice, but i can not understand why is generate the pdf file wrong.

 

Is The imagemagic the problems. ??? so the pdf file not work 100% with the generation from admin ???

 

Sorry my bad english

Link to comment
Share on other sites

Is The PDF Catalog 1.59 From You ???

And If Yes Or You Will Help Me.

 

I Get This When I Will Save From Admin.

 

What can be wrong here : Missing or incorrect image file: C:/Apache2/htdocs/DOMAIN/Webshop15/images/microsoft/msimpro.jpgFPDF error: Not a JPEG file: C:/Apache2/htdocs/DOMAIN/Webshop15/images/

 

The .jpg file are in the folder, so can someone help me here ??? All my product files are .jpg and 100x80

 

Thanks

 

//TheExterminator

Link to comment
Share on other sites

The SQL In The admin/pdf_catalogue.php Is:

 

select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_model, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = s.products_id and p.manufacturers_id = m.manufacturers_id and products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id = c.categories_id order by pd.products_name, p.products_date_added DESC";

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