Jump to content
Sign in to follow this  
BirdBrain

JUST RELEASED! Printable Catalog

Recommended Posts

I saw this had been updated so I gave it another try and while the original error is gone now I'm getting this:

 

Warning: Division by zero in /home2/quin/public_html/catalog/includes/classes/split_page_results.php on line 59

 

I followed the instructions and this page (split_page_results) wasn't touched.

It can be viewed here: http://oddsandinsonline.com/catalog/print_catalog.php

 

Any thoughts?

Share this post


Link to post
Share on other sites
I saw this had been updated so I gave it another try and while the original error is gone now I'm getting this:

I followed the instructions and this page (split_page_results) wasn't touched.

It can be viewed here: http://oddsandinsonline.com/catalog/print_catalog.php

 

Any thoughts?

 

I have the same error (Warning: Division by zero in c:\web\solarhome\catalog\includes\classes\split_page_results.php on line 59)

 

And the catalog pages are not splitted (all products in one page).

 

Does anybody has a solution?

 

Are there another printable catalog that can print product info WITH descriptions?

Share this post


Link to post
Share on other sites

Could some one please share some info how to fix the Division by zero in split_page_results.php on line 59 error?

Share this post


Link to post
Share on other sites
I have the same error (Warning: Division by zero in c:\web\solarhome\catalog\includes\classes\split_page_results.php on line 59)

 

And the catalog pages are not splitted (all products in one page).

 

Does anybody has a solution?

 

Are there another printable catalog that can print product info WITH descriptions?

 

I am having the same problem... any help?

Share this post


Link to post
Share on other sites

I managed to get slightly ahead in this problem (knowing PHP pretty well helped). In the file in question (split_page_results.php), go to the line that shows the following:

 

$this->number_of_rows_per_page = $max_rows;

 

And change it to:

 

$this->number_of_rows_per_page = 10;

 

This solved part of my problem (division by zero). Now I'll see if I can figure out the problem with it not actually dividing the products up into pages.

 

SR Bullo

Share this post


Link to post
Share on other sites
Print_Catalog is designed to display your products with pictures and their full description in a printable format. Products are sorted by their categories and the results are then split into printable pages. You have the ability to control how many products are on each page with a definition change in languages/english/print_catalog.php. The Print_Catalog also has it's own stylesheet so that you can simply the layout and customize the colors separately from the rest of your web site. The printable catalog opens in a new window.

A working version can be seen at:

http://www.bird-e-toys.com/osc/catalog/pri...int_catalog.php

 

We have just installed this Printable Catalog Module in our OSC Store. We are getting the following error with all the products showing up in one page:

Warning: Division by zero in /home/advaitam/public_html/osc/includes/classes/split_page_results.php on line 59

 

The code which is in our split_page_results.php file on line 59 is:

$this->number_of_pages = ceil($this->number_of_rows / $this->number_of_rows_per_page);

 

Could some one help us to overcome this error and also to have split pages.

 

Is there a Printable Catalog which shows only the following Product details?

Model Number - Product Name - Weight - Price

Share this post


Link to post
Share on other sites

Me Too...

 

What I am doing now is just hiding the error output with an hidden <div> and a font color to match the background of the page. How lame.

 

Me needs to learn more that coding thingy.

Share this post


Link to post
Share on other sites

I am making the assumption that you guys are using the contrib found at:

 

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

 

If so, I am also trying to get this contrib working. I do not get the divide by

zero that some of you seem to be getting, so I am ignoring that for the

time being.

 

To get it to display the desired nubmer of pages instead of all of them at once you need to make a change to catalog/print_catalog.php around line 53

$print_catalog_query = tep_db_query($print_catalog_query_raw);

 

Needs to be changed to:

$print_catalog_query = tep_db_query($print_catalog_split->sql_query);


-MichaelC

Share this post


Link to post
Share on other sites

Thank you Michael, you did great! With your correction the script splits the pages. Now the minor problem is with division by zero, but using sbullo's correction for $max_rows it can be also fixed.

Share this post


Link to post
Share on other sites
Thank you Michael, you did great! With your correction the script splits the pages. Now the minor problem is with division by zero, but using sbullo's correction for $max_rows it can be also fixed.

One point more. Can anybody make the script get the $max_rows variable from URL, so one could easily adjust number of products per page?

 

Like /catalog/print_catalog.php?maxrows=n

Share this post


Link to post
Share on other sites

Just noticed that the $max_rows parameter from

 

$this->number_of_rows_per_page = $max_rows;

 

determines the number of products listed in a category listing. So I had to return this parameter to variable and now get the Divisin by zero error. However, after Michael's fix, the print_catalog page shows 4 products per page. Where I can change this parameter?

 

And where the $max_row is set?

Share this post


Link to post
Share on other sites
Just noticed that  the  $max_rows parameter from

 

$this->number_of_rows_per_page = $max_rows;

 

determines the number of products listed in a category listing. So I had to return this parameter to variable and now get the Divisin by zero error. However, after Michael's fix, the print_catalog page shows 4 products per page. Where I can change this parameter?

 

And where  the $max_row is set?

 

The file you want is: catalog/languages/english/print_catalog.php

 

The value to change is:

define('MAX_DISPLAY_PRINT_CATALOG', '10');


-MichaelC

Share this post


Link to post
Share on other sites

My print catalog work great except that the product listed are duplicated like 3 or 4 times each! Somebody know about this problem...?

Please help!

Share this post


Link to post
Share on other sites
Just uploaded a new version (although I never noticed the heavily modded V3.x that is also about - maybe I have just wasted my very sought after important & precious time?!)

 

My new version is here http://www.oscommerce.com/community/contributions,815

 

 

Hi Lewis, Thanks for cool contribution.

I downloaded your latest version 2.0, but it still gives multiple pics and info of the same product.

There must be something more to do with it than the out-commented splits.

 

Any Idea?

My shop: www.tokyotoys.biz

Regards Crazypilot

Share this post


Link to post
Share on other sites

Hi all thanks for a great contrib,

 

just to let you all know what i did, i was after a stand alone system that i could use to create a "catalog" to send out on CD.

 

I used this contrib to create the listing and then saved the html page, which saves all of the info around ie images and voila! - burn to cd and your away!

 

add to a cd with an autorun file and there you have it :)

 

great - thanks

 

 

 

 

On the side - im having trouble getting this to print out properly, it keeps cutting some of the right hand edge, any suggestions?

 

also is there a way to add a little break and then maybe the Category title?

 

or even have it so the categories to be displayed are choosable?

 

thanks

 

mike

 

mike


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

Share this post


Link to post
Share on other sites

Hi

Just installed this contribution but when called up, the printable catalog page comes up blank! I followed the instructions but either I have missed something or there is something wrong with the installation!

 

Help!

 

Thanks!

Share this post


Link to post
Share on other sites
My problem is that when it is run that it does not show any images at all? Any ideas?

 

When I look at the bottom while it is loading it says that its downloading pictures from the rock website, where can I fix this to direct to my own site for the pictures?

Share this post


Link to post
Share on other sites
Hi

Just installed this contribution but when called up, the printable catalog page comes up blank! I followed the instructions but either I have missed something or there is something wrong with the installation!

 

Help!

 

Thanks!

 

I am a dummy when it comes to this stuff, but I really like the printable pricelist you have on your site, good job.

Share this post


Link to post
Share on other sites
When I look at the bottom while it is loading it says that its downloading pictures from the rock website, where can I fix this to direct to my own site for the pictures?

 

Doh - stupid mistake on my part.

 

open catalog/includes/modules/print_catalog.php

 

find

 

echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $print_catalog_array[$i]['id'], 'NONSSL') . '"><img border="0" height="80" width="100" src="http://www.rockshopdirect.co.uk/images/' . $print_catalog_array[$i]['image'] . '"></a>';

 

and change it to

 

echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $print_catalog_array[$i]['id'], 'NONSSL') . '"><img border="0" height="80" width="100" src="YOUR DOMAIN/images/' . $print_catalog_array[$i]['image'] . '"></a>';

Edited by ckyshop.co.uk

Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Share this post


Link to post
Share on other sites

I've installed this Print catalog and I'm getting the same error as others: I have for now only 3 products in my store, for testing purposes. So, the two products that are in two different categories appear 4 times in the catalog and the one product added outside any category appears one time. What can I do to have it right (every product appear 1 time)? I guess it's really importanta nd I couldn't figure out the solution yet.


My Tiny Contribution - Romanian Buttons

Share this post


Link to post
Share on other sites

I am also getting a blank page. I changed the url to my own and it didnt fix it.

 

What else could be the problem? Any Ideas? Thanks

Share this post


Link to post
Share on other sites
Doh - stupid mistake on my part.

 

open catalog/includes/modules/print_catalog.php

 

find

 

echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $print_catalog_array[$i]['id'], 'NONSSL') . '"><img border="0" height="80" width="100" src="http://www.rockshopdirect.co.uk/images/' . $print_catalog_array[$i]['image'] . '"></a>';

 

and change it to

 

echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $print_catalog_array[$i]['id'], 'NONSSL') . '"><img border="0" height="80" width="100" src="YOUR DOMAIN/images/' . $print_catalog_array[$i]['image'] . '"></a>';


Your help and suggestions are greatly appreciated.

Thanks

Wayne

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
Sign in to follow this  

×