Jump to content
Sign in to follow this  
BirdBrain

JUST RELEASED! Printable Catalog

Recommended Posts

Sorry, don't know what happened. What I was trying to do is post a question and halfway through, my internet went haywire and when it came backup the posting was there. Here is what I was trying to post in the hopes that someone with the program could help me.

The contribution works almost perfect but I'm having a problem. A lot of the images I am using items that i have pictures for are rectangular. The program is making them almost square and thus distorting what the item looks like. Is there someway to adjust the code so I can set the height but width will be adjusted accordingly so the pictures are not distorted.

Your help and suggestions are greatly appreciated.

Thanks

Wayne

Share this post


Link to post
Share on other sites

hi there ppl i too have the same error and also owe thanks to Micheal *great fix....

 

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.

 

the problem still exhists for me division by zero....but using sbullo's correction...this won't work for me....i need dif results on dif pages so i still get the error as i need $max_rows to stay where it is......i don't get the error on any of the other pages which use split_page......how do i fix it why is happening....?

 

there must be an error on the print_catalog page in the script somewhere......

 

anyone got a clue.... :blink:

 

:thumbsup: cheers

Edited by doodah

Share this post


Link to post
Share on other sites

it's ok guys have fixed it now it was the featured products of which i have none...

thats why i think it is getting an error which is zero.......

 

anyway here it is remove line 53 of catalog/print_catalog.php:-

 

$featured_products_split = new splitPageResults($featured_products_query_raw, MAX_DISPLAY_FEATURED_PRODUCTS);

 

hey presto the division by zero error has gone ...... ;)

 

*finaly* i lost some sleep on this one......lol >_<

Edited by doodah

Share this post


Link to post
Share on other sites

Hi,

 

I have just add the pritable catalog, but seem to have same errors as others!

 

I am getting duplicates of my items, showing three of each in my printable catalog! Each item is only in one catorgory, and I have no attributes. Has anyone managed to solve this?

 

(I still have some of the original demo products in my shop and they are only shown once each in the printable catalog) :huh:

Share this post


Link to post
Share on other sites

Have just found out why I have duplicates - well sort of!!! :blink:

 

I have some items in subcatorgories under the main catorgories, and some products just in the main catorgories. Products that are in sub-catorgories are not duplicated, but ones that just in the main catorgories show up three times.

 

If I put all my products in sub-catorgories I don't have any problems - but unfortunately as my shop is small, sub-catorgories aren't going to be a very good idea for most products!

 

Any ideas on this?

Share this post


Link to post
Share on other sites

I have installed the Catalog.

 

When I go to my Main Page and click "Printable Catalog", it starts downloading... for quite some time, and seems to be doing fine, but after a few minutes, it gives me the following error:

 

Internet Explorer cannot open the internet site

http://www.adirondacknutrition.com/print_c...3d55bbaf82288dd

 

Operation Aborted

 

 

 

Any ideas on this?

 

vr,

Share this post


Link to post
Share on other sites

I changed the file modules/print_catalog.php

$print_catalog_query = tep_db_query($print_catalog_query_raw);

into

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

 

like recommended before.

 

now I get

1065 - query was empty.

 

Can't split the pages, any suggestions?


Kristine Running Wolf

Share this post


Link to post
Share on other sites

it wasn't the modules/print_catalog.php, I changed the catalog/print_catalog.php, sorry for that but it still don't work.


Kristine Running Wolf

Share this post


Link to post
Share on other sites
Hello,

I have installed this contribution and except for one thing, it looks great!

 

My images are not loading and I can't understand why. Probably a simple fix, but I am not a code expert by any means. Can someone give me some guidance please??

 

http://www.eyeletopia.com/store/print_catalog.php

 

Thanks a lot!

Angela

 

open up the file in your php editor, search for 'rockshopdirect.co.uk' and replace it with 'www.eyeletopia.com'

 

HTH


Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Share this post


Link to post
Share on other sites
open up the file in your php editor, search for 'rockshopdirect.co.uk' and replace it with 'www.eyeletopia.com'

 

HTH

 

Thanks so much for your reply. I appreciate it. That text is nowhere in my code, I think I have an updated contribution, without that problem. I'm not seeing where the problem is in my code though:

 

<?php
/*
 $Id: print_catalog.php,v 1.2 2004/09/17 Stephen Walker SNJ Computers$

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRINT_CATALOG);
 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRINT_CATALOG, '', 'NONSSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="catalogstylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<table class="products" width="775" align="center" border="0" cellspacing="1" cellpadding="1">
<tr>
<!-- header -->
 <td><table class="header" width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
   <td><table class="headerContents" width="100%" border="0" cellspacing="2" cellpadding="2">
    <tr>
     <td align="left"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td>
     <td align="right"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce'); ?></td>
    </tr>
   </table></td>
  </tr>
  <tr>
   <td><table class="headerContents" width="100%" border="0" cellspacing="2" cellpadding="2">
    <tr>
     <td><?php echo (HEADER_TEXT_1) . ' ' . strftime(DATE_FORMAT_LONG); ?></td>
    </tr>
   </table></td>
  </tr>
 </table></td>
<!-- header-eof -->
</tr>
<?php
$print_catalog_query_raw = "select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_image, 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, cd.categories_name, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id=p2c.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id=c.categories_id left join " .	TABLE_CATEGORIES_DESCRIPTION . " cd on c.parent_id='0' and c.categories_id=cd.categories_id left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by cd.categories_name, c.parent_id, c.sort_order, c.categories_id, pd.products_name";

//$print_catalog_split = new splitPageResults($print_catalog_query_raw, MAX_DISPLAY_PRINT_CATALOG);
//$featured_products_split = new splitPageResults($featured_products_query_raw, MAX_DISPLAY_FEATURED_PRODUCTS);
$print_catalog_query = tep_db_query($print_catalog_query_raw);
while ($print_catalog = tep_db_fetch_array($print_catalog_query)) {
      $print_catalog_array[] = array('id' => $print_catalog['products_id'],
                            'name' => $print_catalog['products_name'],
                            'description' => $print_catalog['products_description'],
                                     'model' => $print_catalog['products_model'],
                                     'image' => $print_catalog['products_image'],
                                  'price' => $print_catalog['products_price'],
                                     'specials_price' => $print_catalog['specials_new_products_price'],
                                   'tax_class_id' => $print_catalog['products_tax_class_id'],
                                  'date_added' => tep_date_long($print_catalog['products_date_added']),
                                  'manufacturer' => $print_catalog['manufacturers_name']);
}
?>
<tr>
<!-- top page navigation -->
<!--  <td><table class="header" border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
   <td class="smallText">
<?php 
//echo $print_catalog_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); 
?>
   </td>      
   <td align="right" class="smallText">
<?php 
//echo TEXT_RESULT_PAGE;
// echo $print_catalog_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); 
?>
   </td>
  </tr>
 </table></td> -->
<!-- top page navigation-eof -->
</tr>
<tr>
<!-- catalog -->
 <td><?php require(DIR_WS_MODULES  . 'print_catalog.php');?></td>
<!-- catalog-eof -->
</tr>
<?php
// if (($print_catalog_split->number_of_rows > 0) && (PREV_NEXT_BAR_LOCATION == '2' || PREV_NEXT_BAR_LOCATION == '3')) {
?>
<tr>
<!-- bottom page navigation -->
<!--  <td><table class="header" border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
   <td class="smallText">
<?php
//echo $print_catalog_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); 
?>
   </td>
   <td align="right" class="smallText">
<?php 
//echo TEXT_RESULT_PAGE;
//echo $print_catalog_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); 
?>
   </td>
  </tr>
 </table></td> -->
<!-- bottom page navigation-eof -->
</tr>
<?php
//  }
?>
<tr>
<!-- footer -->
 <td><table class="footer" width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
   <td align="center"><?php echo (FOOTER_TEXT_BODY); ?></td>
  </tr>
 </table></td>
<!-- footer-eof -->
</tr>
</table>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Share this post


Link to post
Share on other sites

Scratch that last post.... I figured out that I was in the catalog/print_catalog.php file rather than the catalog/includes/modules/print_catalog.php file. I found the URL to replace.

 

Thanks so much for your help!!!

Share this post


Link to post
Share on other sites
I have installed the Catalog.

 

When I go to my Main Page and click "Printable Catalog", it starts downloading... for quite some time, and seems to be doing fine, but after a few minutes, it gives me the following error:

 

Internet Explorer cannot open the internet site

http://www.adirondacknutrition.com/print_c...3d55bbaf82288dd

 

Operation Aborted

Any ideas on this?

 

vr,

 

Anyone else get this error?

Share this post


Link to post
Share on other sites
In catalog/print_catalog.php add categories_name to the array. In includes/modules/print_catalog.php use one of the ouput statements as a model and call the array result for your category. Place your statement in the layout where you'd like it.

 

Now, I'm only starting to understand the php coding, but since working with arrays would it be possible to somehow limit the products shown to only one category (or subcat.)??

If yes, several of the questions posted here could be solved by making separate report for each category, and placing the links where needed.

Some clever coder, please read this!

damsbo

Share this post


Link to post
Share on other sites

Hi.

 

Working great - just one small question....

 

When printing the the printable catalog (i.e. the window that appears), on the print out, it cuts off the right-hand side a bit.

 

Is there anything I can do to make it fit on the page better?

 

Cheers,


Nathan H. - Network Administrator

Share this post


Link to post
Share on other sites

Still no answer to multiple of the same products showing? Also, any ideas on showing attributes? This mod is great but I cant go public until It only shows 1 of each item. I have 150 + products and times 3 = way too long to download :) Thanks again for a great cont.


James Scheller

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>';

 

Hi,

Thank you for such a great contribution!

I have one problem, though. My images will not load. I have changed the code as advised above, but all I can see on my page are red crosses instead of images.

When I click on the image with the right mouse button, the address for the image is this: www.mydomain.cz/obchod/images/ ,which is right, only that the name of the image which should follow is missing.

I do not understand how this happened.

Thank you for your help.

Edited by scrappycz

Share this post


Link to post
Share on other sites
Still no answer to multiple of the same products showing?

 

Well the answer should be fairly simple but I'm not sure it is what you want. Based on what I've done with other contributions you can use (in mysql) SELECT DISTINCT and GROUP BY to eliminate the duplicates. What I haven't figured out is how to still keep the results sorted by category.

Share this post


Link to post
Share on other sites
Hi.

 

Working great - just one small question....

 

When printing the the printable catalog (i.e. the window that appears), on the print out, it cuts off the right-hand side a bit.

 

Is there anything I can do to make it fit on the page better?

 

Cheers,

 

In catalog/print_catalog.php find

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<table class="products" width="775" align="center" border="0" cellspacing="1" cellpadding="1">

<tr>

 

and change the 775. 600 has worked for me. :-) But I am still missing the images :-(

Share this post


Link to post
Share on other sites
In catalog/print_catalog.php find

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<table class="products" width="775" align="center" border="0" cellspacing="1" cellpadding="1">

<tr>

 

and change the 775. 600 has worked for me. :-) But I am still missing the images :-(

 

Hello,

I have installed this contribution and am having problems with the page getting cut off on the right hand side during print. I tried the above mentioned hack and it doesn't work for me. Any other ideas on how to get it to print properly?

Thanks,

Moon


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites
Hello,

I have installed this contribution and am having problems with the page getting cut off on the right hand side during print. I tried the above mentioned hack and it doesn't work for me. Any other ideas on how to get it to print properly?

Thanks,

Moon

 

 

I still have this problem. Anybody have a suggestion to fix?

Thanks,

Moon


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites

hi

 

 

the prinable catalog seems very interesting indeed as i am currently trying to build 1 template for my products page so its easy for me when uploading html into the products description section and use for all of my shop items which i am yet to create (all i have is one example on my site).... im creating the html in dreamweaver at the mo and copying/pasting it into the products description but am getting a b and white page when i my design had alot of color in it....???????????

 

if you know anything about this problem and can help me at all with the template for my products then

 

email me back

 

thanking you in advance!!

 

my url is www.stocktogo.co.uk...

 

the problem is located if you go to the daewoo cleaner and go to its despcription...

youlll find all the txt is b/w...

 

oh just letting you know the link you have on this post doesnt work....

Share this post


Link to post
Share on other sites
Sorry, don't know what happened. What I was trying to do is post a question and halfway through, my internet went haywire and when it came backup the posting was there.  Here is what I was trying to post in the hopes that someone with the program could help me.  The contribution works almost perfect but I'm having a problem. A lot of the images I am using items that i have pictures for are rectangular. The program is making them almost square and thus distorting what the item looks like. Is there someway to adjust the code so I can set the height but width will be adjusted accordingly so the pictures are not distorted.

 

 

 

Hi, still having this problem. can anyone offer a suggestion on how this can be corrected?

 

Thanks


Your help and suggestions are greatly appreciated.

Thanks

Wayne

Share this post


Link to post
Share on other sites
Hi, still having this problem. can anyone offer a suggestion on how this can be corrected?

 

Thanks

 

Hi,

I have made all my images square, so I can?t check if this would be a good idea: try set only the height and leave the width blank in admin section - configuration - images

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  

×