Jump to content



Latest News: (loading..)

- - - - -

[Contribution] Categories Images Box support thread


  • Please log in to reply
198 replies to this topic

#41   kymation

kymation

    Believers

  • Community Sponsor
  • 6,686 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 12 February 2009 - 12:09 AM

View Postturbo1982, on Feb 11 2009, 03:25 PM, said:

<snipped>
1364 - Field 'categories_image_front' doesn't have a default value

insert into categories (sort_order, parent_id, date_added) values ('0', '0', now())

[TEP STOP]
This has to be some sort of MySQL setting. I don't get that error. Since it's complaining about default vlues, try setting a default of NULL for the 'categories_image_front' filed. Maybe that will make it shut up.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#42   lightshine

lightshine
  • Members
  • 36 posts
  • Real Name:Lightshine
  • Location:Singapore

Posted 12 February 2009 - 03:34 AM

View Postkymation, on Feb 12 2009, 02:26 AM, said:

Do you mean to call the remote image from your pages, or to import the image to your own server? There's quite a difference.

Regards
Jim
Both ways which you mention would be good but we could start with call the remote image from the page.  :lol:

Edited by lightshine, 12 February 2009 - 03:44 AM.


#43   kymation

kymation

    Believers

  • Community Sponsor
  • 6,686 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 12 February 2009 - 05:34 AM

You'd need to make quite a few changes. Every page that shows a product image uses the tep_image() function. This will have to be removed, along with the constant that stores the location of the images directory. You need to replace that code with the link to your remote site (Probably stored in another constant) and the image from the database. This is going to be a lot of work. Have fun.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#44   lightshine

lightshine
  • Members
  • 36 posts
  • Real Name:Lightshine
  • Location:Singapore

Posted 12 February 2009 - 05:41 AM

View Postkymation, on Feb 12 2009, 01:34 PM, said:

You'd need to make quite a few changes. Every page that shows a product image uses the tep_image() function. This will have to be removed, along with the constant that stores the location of the images directory. You need to replace that code with the link to your remote site (Probably stored in another constant) and the image from the database.
But if i choose to import in the image from remote site to store to the location of images directory, how to do it? I'm new to osc and php, please guide me along! Thank you!

#45   kymation

kymation

    Believers

  • Community Sponsor
  • 6,686 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 12 February 2009 - 05:52 AM

It would probably be better to import the images. If you are using Easy Populate or the CSV contribution, you should be able to modify those to pull remote images. I'm not familiar with either of those contributions, so you'd be better off asking in the support thread for the one that you want to use.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#46   lightshine

lightshine
  • Members
  • 36 posts
  • Real Name:Lightshine
  • Location:Singapore

Posted 12 February 2009 - 06:11 AM

View Postkymation, on Feb 12 2009, 01:52 PM, said:

It would probably be better to import the images. If you are using Easy Populate or the CSV contribution, you should be able to modify those to pull remote images. I'm not familiar with either of those contributions, so you'd be better off asking in the support thread for the one that you want to use.
I tried to ask on the forum for the support thread for Easy Populate, they replied saying that they wouldn't support the feature that i request for to pull image from remote location (just like the easy cvs import contribution).  :(  Am i asking too much for that?

#47   kymation

kymation

    Believers

  • Community Sponsor
  • 6,686 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 12 February 2009 - 06:22 AM

Possibly. This is likely to be of interest to very few people. You may be the only one. If so, you'll probably have to do it yourself or hire someone to code it for you. Or just do without. I'm not trying to discourage you, but that's sometimes the way it is here.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#48   turbo1982

turbo1982
  • Members
  • 23 posts
  • Real Name:sarah eddowes

Posted 14 February 2009 - 12:35 AM

View Postkymation, on Feb 12 2009, 12:09 AM, said:

This has to be some sort of MySQL setting. I don't get that error. Since it's complaining about default vlues, try setting a default of NULL for the 'categories_image_front' filed. Maybe that will make it shut up.

Regards
Jim

Worked a treat! Very pleased
Many thanks
sarah

#49   Mr.JTX

Mr.JTX
  • Members
  • 5 posts
  • Real Name:JT

Posted 15 February 2009 - 07:30 AM

I am having the same problem as some others are having with this contrib.

I am Using RC2a

The categorie box is showing on the index and so are the poduct names etc. everything seems to be working accept the categorie images dont show on the index page ? (the sub categorie images are showing when clicking further)

When I add the images trough the admin (CMS) they are visible and they are also in my catalog/images folder but not visible on the main index of the website i see a little red cross instead of the images

This is what I see when I right click the image: http://mywebsite/catalog/images/

Is there any solution for this problem hope someone can help to fix this minor prob

Edited by Mr.JTX, 15 February 2009 - 07:33 AM.


#50   kymation

kymation

    Believers

  • Community Sponsor
  • 6,686 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 15 February 2009 - 05:54 PM

Did you add an image for each of your categories in your Admin > Categories?

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#51   TOGSUK DC

TOGSUK DC
  • Members
  • 68 posts
  • Real Name:Dan Curtis

Posted 09 March 2009 - 01:33 PM

Hi,

This is probably just me being a bit dense, but can't get the box to appear in my shop. The options are available in admin and have set to true, but no sign of it on my actual shop. Any ideas?

Cheers,

Dan

#52   kymation

kymation

    Believers

  • Community Sponsor
  • 6,686 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 09 March 2009 - 05:14 PM

Did you add the code to catalog/index.php? Any error messages on your front page? What are your box settings?

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#53   TOGSUK DC

TOGSUK DC
  • Members
  • 68 posts
  • Real Name:Dan Curtis

Posted 10 March 2009 - 09:39 AM

Hi Jim,

I've checked and double-checked (I think it may even be at aleast a quadruple of checks) the index.php file both by eye and also, to make sure, with Beyond Compare 3 and all the code that you have said to add is in there. I don't get any error messages, just exactly what my shop looked like before the installation.

Title                                                     Value
Show box                                                   True
Show images in box                                   True
Show name in box                                   True
Show description in box                           True
Box style                                                   Grid
Box columns                                             3
Box frame style                                   Stock

Am very confused!

#54   kymation

kymation

    Believers

  • Community Sponsor
  • 6,686 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 10 March 2009 - 06:32 PM

Look in your page source for
<!-- categories_images //-->
and
<!-- categories_images_eof //-->
The code between those comments is the images box. If you can't figure out what is wrong from there, post just that code and I'll take a look.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#55   TOGSUK DC

TOGSUK DC
  • Members
  • 68 posts
  • Real Name:Dan Curtis

Posted 11 March 2009 - 09:16 AM

This is getting stranger, I've not got that code in my source! I've checked the files through Beyond Compare again and they all seem to be fine but when I check page source, it's not there.

#56   kymation

kymation

    Believers

  • Community Sponsor
  • 6,686 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 11 March 2009 - 04:38 PM

That means that the box code is not bing executed. It can be turned off in the admin, but you have it turned on. Are you using a template or other contribution that messes with the code in index.php? Also, check that you have pasted the code in the correct location on the page, not in a section that is not being executed.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#57   TOGSUK DC

TOGSUK DC
  • Members
  • 68 posts
  • Real Name:Dan Curtis

Posted 12 March 2009 - 09:16 AM

Hi Jim,

Here is my index.php, although I am starting to get the hang of this php lark (having never done anything with it at all about 5 weeks ago) I am lost with this one. Is it clashing with another add-on?

<?php
/*
  $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $

  osCommerce, Open Source E-Commerce Solutions
  [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

  Copyright © 2003 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

// the following cPath references come from application_top.php
  $category_depth = 'top';
  if (isset($cPath) && tep_not_null($cPath)) {
	$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
	$cateqories_products = tep_db_fetch_array($categories_products_query);
	if ($cateqories_products['total'] > 0) {
	  $category_depth = 'products'; // display products
	} else {
	  $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
	  $category_parent = tep_db_fetch_array($category_parent_query);
	  if ($category_parent['total'] > 0) {
		$category_depth = 'nested'; // navigate through the categories
	  } else {
		$category_depth = 'products'; // category has no products, but display the 'no products' message
	  }
	}
  }

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<?php
/*** Begin Header Tags SEO ***/
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
  require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?>
  <title><?php echo TITLE; ?></title>
<?php
}
/*** End Header Tags SEO ***/
?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
  <tr>
	<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
	</table></td>
<!-- body_text //-->
<?php
	if ($category_depth == 'nested') {
	/*** Begin Header Tags SEO ***/
	$category_query = tep_db_query("select cd.categories_name, c.categories_image, cd.categories_htc_title_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
	/*** end Header Tags SEO ***/
	$category = tep_db_fetch_array($category_query);
?>
	<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			 <?php /*** Begin Header Tags SEO ***/ ?>
		   <td><h1><?php echo $category['categories_htc_title_tag']; ?></h1></td>
		   <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
		  </tr>
		   <?php if (tep_not_null($category['categories_htc_description'])) { ?>
		  <tr>
		   <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
		  </tr>
		  <tr>
		   <td colspan="2"><h2><?php echo $category['categories_htc_description']; ?></h2></td>
		  </tr>
		  <?php } 
		  /*** End Header Tags SEO ***/ 
		  ?>
		</table></td>
	  </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
			  <tr>
<?php
	if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
	  $category_links = array_reverse($cPath_array);
	  for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
		$categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
		$categories = tep_db_fetch_array($categories_query);
		if ($categories['total'] < 1) {
		  // do nothing, go through the loop
		} else {
		  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
		  break; // we've found the deepest category the customer is in
		}
	  }
	} else {
	  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
	}

	$number_of_categories = tep_db_num_rows($categories_query);

	$rows = 0;
	while ($categories = tep_db_fetch_array($categories_query)) {
	  $rows++;
	  $cPath_new = tep_get_path($categories['categories_id']);
	  $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
	  echo '				<td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";
	  if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
		echo '			  </tr>' . "\n";
		echo '			  <tr>' . "\n";
	  }
	}

// needed for the new products module shown below
	$new_products_category_id = $current_category_id;
?>
			  </tr>
			</table></td>
		  </tr>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
		  </tr>
		  <tr>
			<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
		  </tr>
		  <!--- BEGIN Header Tags SEO Social Bookmarks -->
		  <?php if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') 
		   include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php'); 
		  ?>
		  <!--- END Header Tags SEO Social Bookmarks -->  
		</table></td>
	  </tr>
	</table></td>
<?php
  } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
// create column list
	$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
						 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
						 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
						 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
						 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
						 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
						 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
						 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

	asort($define_list);

	$column_list = array();
	reset($define_list);
	while (list($key, $value) = each($define_list)) {
	  if ($value > 0) $column_list[] = $key;
	}

	$select_column_list = '';

	for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
	  switch ($column_list[$i]) {
		case 'PRODUCT_LIST_MODEL':
		  $select_column_list .= 'p.products_model, ';
		  break;
		case 'PRODUCT_LIST_NAME':
		  $select_column_list .= 'pd.products_name, ';
		  break;
		case 'PRODUCT_LIST_MANUFACTURER':
		  $select_column_list .= 'm.manufacturers_name, ';
		  break;
		case 'PRODUCT_LIST_QUANTITY':
		  $select_column_list .= 'p.products_quantity, ';
		  break;
		case 'PRODUCT_LIST_IMAGE':
		  $select_column_list .= 'p.products_image, ';
		  break;
		case 'PRODUCT_LIST_WEIGHT':
		  $select_column_list .= 'p.products_weight, ';
		  break;
	  }
	}

// show the products of a specified manufacturer
	if (isset($HTTP_GET_VARS['manufacturers_id'])) {
	  if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
		$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
	  } else {
// We show them all
		$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
	  }
	} else {
// show the products in a given categorie
	  if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
		$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
	  } else {
// We show them all
		$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
	  }
	}

	if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
	  for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
		if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
		  $HTTP_GET_VARS['sort'] = $i+1 . 'a';
		  $listing_sql .= " order by pd.products_name";
		  break;
		}
	  }
	} else {
	  $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
	  $sort_order = substr($HTTP_GET_VARS['sort'], 1);

	  switch ($column_list[$sort_col-1]) {
		case 'PRODUCT_LIST_MODEL':
		  $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
		  break;
		case 'PRODUCT_LIST_NAME':
		  $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
		  break;
		case 'PRODUCT_LIST_MANUFACTURER':
		  $listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
		  break;
		case 'PRODUCT_LIST_QUANTITY':
		  $listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
		  break;
		case 'PRODUCT_LIST_IMAGE':
		  $listing_sql .= " order by pd.products_name";
		  break;
		case 'PRODUCT_LIST_WEIGHT':
		  $listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
		  break;
		case 'PRODUCT_LIST_PRICE':
		  $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
		  break;
	  }
	}
	/*** Begin Header Tags SEO ***/
	if (isset($HTTP_GET_VARS['manufacturers_id']))
	  $db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
	else
	  $db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");

	$htc = tep_db_fetch_array($db_query);
	?>
	<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td><h1><?php echo $htc['htc_title']; ?></h1></td>
	<?php /*** End Header Tags SEO ***/ ?>
<?php
// optional Product List Filter
	if (PRODUCT_LIST_FILTER > 0) {
	  if (isset($HTTP_GET_VARS['manufacturers_id'])) {
		$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";
	  } else {
		$filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
	  }
	  $filterlist_query = tep_db_query($filterlist_sql);
	  if (tep_db_num_rows($filterlist_query) > 1) {
		echo '			<td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . '&nbsp;';
		if (isset($HTTP_GET_VARS['manufacturers_id'])) {
		  echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
		  $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
		} else {
		  echo tep_draw_hidden_field('cPath', $cPath);
		  $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
		}
		echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);
		while ($filterlist = tep_db_fetch_array($filterlist_query)) {
		  $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
		}
		echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
		echo tep_hide_session_id() . '</form></td>' . "\n";
	  }
	}

// Get the right image for the top-right
	$image = DIR_WS_IMAGES . 'table_background_list.gif';
	if (isset($HTTP_GET_VARS['manufacturers_id'])) {
	  $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
	  $image = tep_db_fetch_array($image);
	  $image = $image['manufacturers_image'];
	} elseif ($current_category_id) {
	  $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
	  $image = tep_db_fetch_array($image);
	  $image = $image['categories_image'];
	}
?>
		  <?php /*** Begin Header Tags SEO ***/ ?>
		   <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, $htc['htc_title'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
		  </tr>
		  <?php if (tep_not_null($htc['htc_description'])) { ?>
		  <tr>
		   <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
		  </tr>
		  <tr>
		   <td colspan="2"><h2><?php echo $htc['htc_description']; ?></h2></td>
		  </tr>
		  <?php } 
		  /*** End Header Tags SEO ***/ 
		  ?>
		</table></td>
	  </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
		<td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td>
	  </tr>
			<!--- BEGIN Header Tags SEO Social Bookmarks -->
	  <?php if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') 
	   include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php'); 
	  ?>
	  <!--- END Header Tags SEO Social Bookmarks -->  

	</table></td>
<?php
  } else { // default page
?>
	<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
			<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
		<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td class="main"><?php echo tep_customer_greeting(); ?></td>
		  </tr>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
		  </tr>
		  <tr>
			<td class="main"><?php echo TEXT_MAIN; ?></td>
		  </tr>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
		  </tr>
		  <tr>
			<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
		  </tr>
<?php
	include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);
?>
		</table></td>
	  </tr>
	</table></td>
<?php
  }
?>
<!-- body_text_eof //-->
	<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
	</table></td>
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


#58   kymation

kymation

    Believers

  • Community Sponsor
  • 6,686 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 12 March 2009 - 05:05 PM

I don't see the Image Box code anywhere on that page. You need to find these lines
		   <tr>
			<td class="main"><?php echo TEXT_MAIN; ?></td>
		  </tr>
and add these lines just after
<?php 
// Start Categories Images Box  
	if (CATEGORIES_IMAGES_BOX == 'True') {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
		  </tr>
		  <tr>
			<td><?php include(DIR_WS_MODULES . FILENAME_CATEGORIES_IMAGES); ?></td>
		  </tr>
<?php 
	} // if (CATEGORIES_IMAGES_BOX
// End Categories Images Box  
?>
Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#59   TOGSUK DC

TOGSUK DC
  • Members
  • 68 posts
  • Real Name:Dan Curtis

Posted 13 March 2009 - 08:28 AM

Finally got it working!!!  :D  For some reason, the three catalog based files had reverted back to their previous state had to download them, change in Dreamweaver then upload again.

Thanks for help Jim

#60   Auberydude

Auberydude
  • Members
  • 7 posts
  • Real Name:Mark Andrews

Posted 08 April 2009 - 03:32 PM

Hi Jim

I was wondering how I can turn off the top left hand corner in the box.  When I change the settings in categories.php to

new infoBoxHeading($info_box_contents, false, false);  

(from true) it turns off the corner in the original catgories box but not this one.  Is there a way to do it?

Thanks

Mark
www.rdwebdesign.co.uk