Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PDF Catalog v.1.5


Recommended Posts

  • Replies 504
  • Created
  • Last Reply

Top Posters In This Topic

Hey Antonios,

If you take the time to answer things, there's just one more question I'd like answered in order to complete the modifications I'd like to have:

 

Is there a way to force a page break (new page) after each product... so that there aren't 2 or 3 products on the same page?

 

Thanks and congratulations on Greece 2 - Portugal 1. See ya,

BD

Link to comment
Share on other sites

Hi everybody!

 

Well, I have good and bad answers ... ! :-)

 

The good answers first, most of the requested changes are possible. I already managed to find how to:

* Remove the categories tree/listing,

* Force a page break after each product,

* Type "Model: " in front of the model number,

* Make the Cover Page display an image instead of the text name of the store.

 

what are the dimensions for a header image

 

30 mm height and 210 mm width

 

Thin, black borders are being drawn around my product images... is there a way to make them white (so they blend into the background) or to make them disappear?

 

Yes, there is such a solution!

 

Also, How do you put the main category on the same page as the first lot of products, instead of having it on its own page in the center.

 

I don't know for the moment!

 

Also, is there any way to easily make it display using 2 columns?

 

As far as I know, no!!

 

:ph34r:

 

And the bad news ... how the hell shall I include so many changes in one single file?!?!?! :blink: No, I won't just post the changes to make for each tweak to work, it would be too time consuming and will lead to errors, misunderstandings and ... more work!! I will have to think about it over night! :unsure:

Edited by detsouvalas

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Hey,

 

I have been working for a few hours, and I have finally finished almost everything that I wanted to do with the pricelist.

I have found out how to make multiple columns (which is easy), as well as manipulating everything.

 

So I have completed almost everything that I was originally asking about (well some of it has changed slightly, but the methods i was needed have remained the same).

 

If anyone wants to know how to do any of it then let me know and I will see what I can do about explaining it.

 

However, if you have any programming experience, then it shouldnt be a problem for you to figure it out yourself.

 

However, there is two things that I cannot figure out/fix.

 

Firstly, on my first lot of products (products are contained in the subcategory), it will not print the main category label.

i.e. it displays '-->sub category' instead of 'main category --> sub category'. Why is that happening? I cannot seem to figure it out. This was actually happening before any modifications were happening. For everyother main category and subcategory it is working fine - the error is only for the first main category.

 

Also, I want to know how to display the WHOLE categories path to the product instead of the current category and its parent category.

My categories table is a maximum of 3 levels. If you can help me then it would be greatly appreciated.

 

Cheers,

Chris :)

Link to comment
Share on other sites

sorry to go on but i am still having troubles with the images being stretched and distorted and i have tried changinh the resize option?!

 

any more ideas?

"because it'll hurt more"- the greatest film of all time?

Link to comment
Share on other sites

billybrag,

 

i am still having troubles with the images being stretched and distorted

 

Just curious ... what's the original size of your images and what are the maximum image values you have entered in the pdf_config file?

 

 

And a general question ...

 

1) Would you like or do you think it would be useful to make the module's configuration through the database (all options or part of it)?

2) Would you like to have the PDF files generated approximately once a day when a user visits the pdf_catalogue_info page?

3) Would you think it is a good idea to include different 'flavors' to create the PDF file?

4) Do you want to offer the generated PDF file in .zip format to your visitors?

 

To be brief ... what do you further expect from PDF Catalog??

 

Thanx for the time you will spend to answer!

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Hi there detsouvalas

 

Thnx for a very nice contribution!

1) Would you like or do you think it would be useful to make the module's configuration through the database (all options or part of it)?
It would be a very nice touch to be able to set all of the config vars through the DB...
2) Would you like to have the PDF files generated approximately once a day when a user visits the pdf_catalogue_info page?
IMHO, it is better the way it is today, it gives the admin a good control over the publication part, maybe it would be a good idea to give the admin option to "turn off" the .PDF?
3) Would you think it is a good idea to include different 'flavors' to create the PDF file?
This would be a very good option, i have an PDF that today is about 10Mb (with "only" 200+ products) and it getting bigger...
4) Do you want to offer the generated PDF file in .zip format to your visitors?
See the above ;)

----===~~oOo~~===----

// Bjarne Varoystrand aka Black Skorpio

Do to others what you want them to do to you

- �� Lek och Lust F�r Vuxna

Link to comment
Share on other sites

i have the heights set up as follows

	//Width max in mm     
define('MAX_IMAGE_WIDTH',50);

//Height max in mm          
define('MAX_IMAGE_HEIGHT',50);

 

and the original image sizes are about 230 * 370 ish

 

an example of the catalogue i produce is HERE

"because it'll hurt more"- the greatest film of all time?

Link to comment
Share on other sites

Check the following image types that are allowed:

 

For JPEG, all flavors are allowed:

gray scales

true colors (24 bits)

CMYK (32 bits)

For PNG, are allowed:

gray scales on at most 8 bits (256 levels)

indexed colors

true colors (24 bits)

but are not supported:

Interlacing

Alpha channel

 

Maybe your images are interlaced or 'use' alpha channel?

 

I will post a question about this problem in the FPDF forum, using the provided link as an exemple!

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Antonios:

Do you know where to change text lenght for option type? I would like to have box not a just one line for entering the text

Edited by goran
Link to comment
Share on other sites

Billybrag,

 

I don't want to give you false hope, but I may have found out why your images are so distorted ... I have to do some testing first, you will hear again from me tomorrow!

 

 

BTW, tomorrow, I will release a beta version of the updated PDF Catalog script ... stay tuned!

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

To whom it may concern:

 

Many PDF Catalog users reported distorted images. This issue should have been settled in the new release of the script. For those who don't want to upgrade without being sure that it works, I will explain how to patch script v.1.5x.

 

Edit file /catalog/admin/pdf_catalogue.php.

 

Find around line 194

$im=imagecreate($width/PDF_TO_MM_FACTOR, $height/PDF_TO_MM_FACTOR);

and replace with

$im=imagecreatetruecolor($width/PDF_TO_MM_FACTOR, $height/PDF_TO_MM_FACTOR);

 

Find around line 199

$im=imagecreate($height/PDF_TO_MM_FACTOR,$width/PDF_TO_MM_FACTOR);

and replace with

$im=imagecreatetruecolor($height/PDF_TO_MM_FACTOR,$width/PDF_TO_MM_FACTOR);

 

Find around line 359

  if(SHOW_IMAGES && strlen($data_array[12]))
 {	
	 //If Small Image Width and Small Image Height are defined
	 if(strlen($data_array[0])>1 && strlen($data_array[1])>1)
 {
   $this->ShowImage($data_array[0],$data_array[1],$link,$data_array[12]);
   $y1=$this->GetY();
 }
    //If only Small Image Width is defined
 else if(strlen($data_array[0])>1 && strlen($data_array[1]))
 {   
     $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();
 }
 //If only Small Image Height is defined
 else if(strlen($data_array[0]) && strlen($data_array[1])>1)
 {
	 $heightwidth=getimagesize($data_array[12]);
	 $data_array[0]=$width=$heightwidth[0]*PDF_TO_MM_FACTOR;
     $data_array[1]=$data_array[1];
	 
   $this->ShowImage($data_array[0],$data_array[1],$link,$data_array[12]);
   $y1=$this->GetY();
 }
 else
 {
	 $heightwidth=getimagesize($data_array[12]);
	 $data_array[0]=$heightwidth[0]*PDF_TO_MM_FACTOR;
     $data_array[1]=$heightwidth[1]*PDF_TO_MM_FACTOR;
	 
   $this->ShowImage($data_array[0],$data_array[1],$link,$data_array[12]);
   $y1=$this->GetY();
 }
 
 //Margin=10
 $this->SetX(10);
}
else
{
 $data_array[0]=$data_array[1]=0;
 $y1=$this->GetY();
 $this->SetFont('Arial','',8);
}

and replace with

  if((SHOW_IMAGES == 1) && strlen($data_array[12]))
 {	
 $heightwidth=getimagesize($data_array[12]);
 $data_array[0]=$heightwidth[0]*PDF_TO_MM_FACTOR;
 $data_array[1]=$heightwidth[1]*PDF_TO_MM_FACTOR;
	 
	 $this->ShowImage($data_array[0],$data_array[1],$link,$data_array[12]);
	 $y1=$this->GetY();
 //}
 
 //Margin=10
 $this->SetX(10);
}
else
{
 $data_array[0]=$data_array[1]=0;
 $y1=$this->GetY();
 $this->SetFont('Arial','',8);
}

 

Now, the images in the PDF file, even if you set 'resize_images' to true, should show up nicely. But note that resizing images inevitably distorts them!

 

Also, play a bit with the 'max_image_width' and 'max_image_height' settings and 'respect' the average proportions of the image files you use in your osC shop!

 

E.g. Billybrag, I noticed by visiting your site, that you use images that are oblong (like book covers normally are!), so after making the necessary changes as instructed above, set 'max_image_width' to 30 and 'max_image_height' to 50, or 50/80! It worked for me with your images! ;-)

 

As usual, feedback is apprieciated!

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Oh, I forgot, I made an announcement without thinking too much during that moment :blink: in a new thread! Unofficial release of PDF Catalogs v.1.6 Beta can be downloaded here!

 

 

Do you know where to change text lenght for option type? I would like to have box not a just one line for entering the text

 

Ehh, I fear that I donno understand what you would like to do! :unsure:

Edited by detsouvalas

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Worked like a charm, thanks.

 

I tryed to add my price breaks and added products_price1 .. price4 to the sql query and the array and changed

  if(VAT)
 {
 $withoutvat=sprintf("%01.".DIGITS_AFTER_DOT."f",$data_array[9]);
 $vatprice=sprintf("%01.".DIGITS_AFTER_DOT."f",((VAT/100)*$data_array[9])+$data_array[9]);
 $vatspecialsprice=sprintf("%01.".DIGITS_AFTER_DOT."f",((VAT/100)*$data_array[8])+$data_array[8]);
 }

 	 if(CURRENCY_RIGHT_OR_LEFT == 'R')
	 {
   $this->MultiCell(180-$data_array[0],5,$vatprice.CURRENCY."\t".$withoutvat.CURRENCY." (exkl. MwSt.)\t\t\t".$vatspecialsprice.CURRENCY,1,'L',1);
	 }

to show prices withput (price break prices should follow)

 

but no output?! only the normal $vatprice appears.

 

anybody willing to help me? :/ thanks!

Link to comment
Share on other sites

this is exactly what I have been looking for, but alas I still have some problems with it.

I just installed 1.51 and counfigured everything then I played around with the php.ini and even with timeout of 90sec it didn't work so I just turned it to 600 to see if the pdf catalog works.

Well after a not so short while it finishes without any errors but alas I have no pdf file :(

any ideas ?

Link to comment
Share on other sites

Hi Dracula!

 

Well after a not so short while it finishes without any errors but alas I have no pdf file, any ideas ?

 

Well, having spent some hours playing around with the beast, I know that the described situation happens ... when an error occurs! :-)

Could you please install the newer version of the script and try again?

 

Awaiting news from you! :-)

Edited by detsouvalas

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

ok installed the new version, and loaded the sql script

but I have no entry in "configuration" where I can configure the pdf_catalog

I do not have the normal oscommerce setup, I have os2Max.

anybody an idea what I have to do to get the links in the configuration box ?

Link to comment
Share on other sites

stonebridgecomputing

 

Fantastic Contribution.

 

Now, I need to know a few things.

 

Firstly, how do you get rid of the categories tree at the beginning of the PDF? It takes up too much space.

 

Also, How do you put the main category on the same page as the first lot of products, instead of having it on its own page in the center. This at the moment is meaning my pdf is about 40-50 pages longer than it needs to be.

 

Also, is there any way to easily make it display using 2 columns?

 

And... is there anyway to display the product details like this:

 

model - description - price

 

instead of....

 

model

description

price

 

So, i want to have the model number on the same line as the first line of the description. And I want to have the price either at the end of the description, in bold, or in a column to the right of the description, OR, having the price at the end of the description aligned right and also in Bold (this last one would probably be prefered).

 

If you can help me out then it would be greatly appreciated.

 

Cheers,

Chris 

 

If you have donned it, I like to make the same changes, can you post how to do or make a contribution?

 

serena

 

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.

 

I like to do that also how to do?

 

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

 

how to do?

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