Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Trying to figure out how to create a hover large image for product listing


lindsayanng

Recommended Posts

Ok.. So i am TRYING to create an effect much like this:

Stu Nichols CSS play - click on a category tab at top and see the effect when you hover an image in that category

This is the CSS that i was using:

div#pic a .std {display: none;}
div#pic a:hover .large{position:relative; top:10px; left:100px; background-color:#fff; z-index:100;}
div#pic a:hover .large
{position:relative; top:10px; left:100px; background-color:#fff; z-index:100;}

 

and since I am trying to apply it to my product_listing.php page (from spook's product listing enhancement contribution), I changed this code:

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . $link . tep_image(DIR_WS_IMAGES . $image, ($addimages ? (tep_not_null($selected_image['images_description']) ? $selected_image['images_description'] : (tep_not_null($selected_image['products_image_description']) ? $selected_image['products_image_description'] : $products['products_name'])) : $products['products_name']), PRODUCT_IMAGE_WIDTH, '') . '</a>' . '<br>';

 

to this:

 

$alt_text = ($addimages ? (tep_not_null($selected_image['images_description']) ? $selected_image['images_description'] : (tep_not_null($selected_image['products_image_description']) ? $selected_image['products_image_description'] : $products['products_name'])) : $products['products_name']);  

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . $image, $alt_text, 200, '', 'class="large"')  . '</a></div>' . '<br>';

 

HOWEVER, i got the image to pop over when you hovered, but i have NO IDEA how to make it use the large image when you hover, instead of the same image

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

  • Replies 102
  • Created
  • Last Reply
Ok.. So i am TRYING to create an effect much like this:

Stu Nichols CSS play - click on a category tab at top and see the effect when you hover an image in that category

This is the CSS that i was using:

div#pic a .std {display: none;}
div#pic a:hover .large{position:relative; top:10px; left:100px; background-color:#fff; z-index:100;}
div#pic a:hover .large
{position:relative; top:10px; left:100px; background-color:#fff; z-index:100;}

 

and since I am trying to apply it to my product_listing.php page (from spook's product listing enhancement contribution), I changed this code:

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . $link . tep_image(DIR_WS_IMAGES . $image, ($addimages ? (tep_not_null($selected_image['images_description']) ? $selected_image['images_description'] : (tep_not_null($selected_image['products_image_description']) ? $selected_image['products_image_description'] : $products['products_name'])) : $products['products_name']), PRODUCT_IMAGE_WIDTH, '') . '</a>' . '<br>';

 

to this:

 

$alt_text = ($addimages ? (tep_not_null($selected_image['images_description']) ? $selected_image['images_description'] : (tep_not_null($selected_image['products_image_description']) ? $selected_image['products_image_description'] : $products['products_name'])) : $products['products_name']);  

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . $image, $alt_text, 200, '', 'class="large"')  . '</a></div>' . '<br>';

 

HOWEVER, i got the image to pop over when you hovered, but i have NO IDEA how to make it use the large image when you hover, instead of the same image

After the above changes have been made perform the following:

In index.php find:

$select_column_list .= 'p.products_image, ';

and add below:

$select_column_list .= 'p.large_products_image, ';

 

In product_listing.php find:

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . $image, $alt_text, 200, '', 'class="large"')  . '</a></div>' . '<br>';

and change to:

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . (tep_not_null($listing['large_products_image']) ? '$listing['large_products_image']' : ''), $alt_text, 200, '', 'class="large"')  . '</a></div>' . '<br>';

That should pull the large image.

Link to comment
Share on other sites

ok.. playcraft..

 

I am working with the PLAIN CODE from the original files i posted in the other thread..

I made these changes as you asked:

In index.php make the following changes:

Find:

CODE

$select_column_list .= 'p.products_image, ';

 

and add below:

CODE

$select_column_list .= 'p.large_products_image, ';

 

 

Also in index.php you will need to include the css code.

 

 

Do not perform this next step in a production environment.

 

In product_listing.php the following changes need to be performed:

Find:

CODE

$display .= '<table summary="" width="100%" ><tr><td style="text-align:center;" valign="top" height="'.PRODUCT_IMAGE_VSPACE.'" >'.$image.'</td></tr></table>';

 

and replace with:

CODE

$display .= '<table summary="" width="100%" ><tr><td style="text-align:center;" valign="top" height="'.PRODUCT_IMAGE_VSPACE.'" >'.$image. tep_image(DIR_WS_IMAGES . $listing['large_products_image'], $listing['products_name'], '', '', 'class="large"') .'</td></tr></table>';

 

You will need to add a link in there as well.

I can't really take this any further as I would be coding in the dark.

 

You can watch my progress at this link"

catalog - click on pets -> trap falls to see a nice product list

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

ok.. playcraft..

 

I am working with the PLAIN CODE from the original files i posted in the other thread..

I made these changes as you asked:

 

 

You can watch my progress at this link"

catalog - click on pets -> trap falls to see a nice product list

Do you have the files from before when you "almost had it working?"

Link to comment
Share on other sites

your changes were made playcraft.. You can see the effects.. no desired

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I have made all changes requested..

 

Check the site now.. I changed the style sheet to this:

div#pic a .large {display: none;}
div#pic a:hover .large
{
position:absolute; margin-left:0px; margin-top:-20px; display: block;
}

 

horizontal images are showing SMALL verticle are showing larger.. there is a define in the width that i need to get rid of.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

what if i got rid of the width define all together.. I dont need it because ALL of the images show as the sizes that they are.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

what if i got rid of the width define all together.. I dont need it because ALL of the images show as the sizes that they are.

If you want to do that then perform the following in product_listing.php:

change:

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . (tep_not_null($listing['large_products_image']) ? '$listing['large_products_image']' : ''), $alt_text, 200, '', 'class="large"')  . '</a></div>' . '<br>';

to

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . (tep_not_null($listing['large_products_image']) ? '$listing['large_products_image']' : '$image'), $alt_text, '', '', 'class="large"')  . '</a></div>' . '<br>';

Link to comment
Share on other sites

that yielded an unexpect T_STRING

 

Are you following on my website?

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

<?php
/*
 $Id: product_listing.php,v 2.1.7 2008/07/24 22:49:59 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
$graphic_bord = 'no'; //  set to 'yes' if you have older 'graphic borders' and not 'easy graphic borders'.

$cat_path = false; // set to true to include category paths in urls

if (tep_not_null($HTTP_GET_VARS['sort'])) $_GET['sort'] = $HTTP_GET_VARS['sort'];
$max_results = (tep_not_null($_GET['max']) ? $_GET['max'] : MAX_DISPLAY_SEARCH_RESULTS);
if (PRODUCTS_PER_ROW == 'PRODUCTS_PER_ROW' || PRODUCTS_PER_ROW == 0 || LISTING_SWITCH == 'LISTING_SWITCH') { $to = 'Setup Error!\nPlease ensure you have run the\nProduct Listing Setup File.'; print "<script>alert('$to');</script>"; }

// sort order array
if ($_GET['sort'] == '0d') $sort_array[] = array('id' => 0 . 'd', 'text' => DATE_ORDER);
for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
  switch ($column_list[$i]) {
	case 'PRODUCT_LIST_MODEL':
			$sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_MODEL . APHA_ORDER);
	  break;
	case 'PRODUCT_LIST_NAME':
	  $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_PRODUCTS . APHA_ORDER);
	  break;
	case 'PRODUCT_LIST_MANUFACTURER':
	  $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_MANUFACTURER . APHA_ORDER);
	  break;
	case 'PRODUCT_LIST_QUANTITY':
	  $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_QUANTITY . NUM_ORDER);
	  break;
	case 'PRODUCT_LIST_WEIGHT':
	  $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_WEIGHT . NUM_ORDER);
	  break;
			case 'PRODUCT_LIST_PRICE':
			  $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_PRICE . NUM_ORDER);
	  break;	
  }
}
for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
  switch ($column_list[$i]) {
	case 'PRODUCT_LIST_MODEL':
			$sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_MODEL . REVERSE_ALPHA_ORDER);
	  break;
	case 'PRODUCT_LIST_NAME':
	  $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_PRODUCTS . REVERSE_ALPHA_ORDER);
	  break;
	case 'PRODUCT_LIST_MANUFACTURER':
	  $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_MANUFACTURER . REVERSE_ALPHA_ORDER);
	  break;
	case 'PRODUCT_LIST_QUANTITY':
	  $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_QUANTITY . REVERSE_NUM_ORDER);
	  break;
	case 'PRODUCT_LIST_WEIGHT':
	  $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_WEIGHT . REVERSE_NUM_ORDER);
	  break;
			case 'PRODUCT_LIST_PRICE':
			  $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_PRICE . REVERSE_NUM_ORDER);
	  break;	
  }
}	
// Max Results Array		
for ($i=1, $n=10; $i<$n; $i++) {		
	$max_display[] = array('id' => MAX_DISPLAY_SEARCH_RESULTS * $i, 'text' => MAX_DISPLAY_SEARCH_RESULTS * $i); 
	}	
	$max_display[] = array('id' => 1000000, 'text' => 'Show All');
// store GET vars		
$get_vars = '';
reset($_GET);
while (list($key, $value) = each($_GET)) {
  if ( ($key != 'sort') && ($key != 'max') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {
	$get_vars .= tep_draw_hidden_field($key, $value);
  }
}
$top_nav = ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'));
$base_nav = ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'));		
$listing_split = new splitPageResults($listing_sql, $max_results, 'p.products_id');

$page_nav = '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">' .  $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS) . '</td><td class="smallText" align="right">' . TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))) . '</td></tr></table>';
$drop = '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">Results/Page: '. tep_draw_form('maxdisplay', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . $get_vars . (isset($_GET['sort']) ? tep_draw_hidden_field('sort', $_GET['sort']) : '') .  tep_draw_pull_down_menu('max', $max_display, $_GET['max'], 'onChange="this.form.submit();"') . tep_hide_session_id().'</form></td><td class="smallText" align="right">Sort Order: ' . tep_draw_form('sorting', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . $get_vars . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : '') . tep_draw_pull_down_menu('sort', $sort_array, $_GET['sort'], 'onChange="this.form.submit();"') . tep_hide_session_id().'</form></td></tr></table>';
if ( ($listing_split->number_of_rows > (int)$max_results) && $top_nav ) echo $page_nav;
if ($top_nav && ($listing_split->number_of_rows > 0)) echo $drop;

function tep_get_category_name($category_id, $language_id) {
   $category_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id . "'");
 $category = tep_db_fetch_array($category_query);

  return $category['categories_name'];
 }
function tep_get_manufacturer_name($manufacturer_id) {
   $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$manufacturer_id . "'");
 $manufacturer = tep_db_fetch_array($manufacturers_query);

  return $manufacturer['manufacturers_name'];
 }

function list_box_head($column_list) {
 for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
switch ($column_list[$col]) {
  case 'PRODUCT_LIST_MODEL':
	$lc_text = TABLE_HEADING_MODEL;
	$lc_align = 'center';
	break;
  case 'PRODUCT_LIST_NAME':
	$lc_text = TABLE_HEADING_PRODUCTS;
	$lc_align = 'center';
	break;
  case 'PRODUCT_LIST_MANUFACTURER':
	$lc_text = TABLE_HEADING_MANUFACTURER;
	$lc_align = 'center';
	break;
  case 'PRODUCT_LIST_PRICE':
	$lc_text = TABLE_HEADING_PRICE;
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_QUANTITY':
	$lc_text = TABLE_HEADING_QUANTITY;
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_WEIGHT':
	$lc_text = TABLE_HEADING_WEIGHT;
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_IMAGE':
	$lc_text = TABLE_HEADING_IMAGE;
	$lc_align = 'center';
	break;
  case 'PRODUCT_LIST_BUY_NOW':
	$lc_text = (strstr(LISTING_BUTTON, 'buy now')? TABLE_HEADING_BUY_NOW : TABLE_HEADING_DETAIL);
	$lc_align = 'center';
	break;
}
if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
  $lc_text = tep_create_sort_heading($_GET['sort'], $col+1, $lc_text);
}
  $list_box_contents[] = array('align' => $lc_align,'params' => 'class="productListing-heading"','text' => ' ' . $lc_text . ' ');
 }
 return ($list_box_contents);
}
// function list_head end	

function list_box_data($listing, $column_list) {
	global $PHP_SELF, $cPath, $cat_path;
				$currencies = new currencies();
			$man_id = (tep_not_null($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : '');	
		$link = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id'] . ($man_id ? '&manufacturers_id='.$man_id : ($cPath && $cat_path ? '&cPath=' . $cPath : '')) ) . '"' . ($man_id || ($cat_path && $cat_path) ? ' rel="nofollow"' : '') . '>';
	$buypic = (LISTING_BUTTON == 'buy now' ? 'button_in_cart.gif' : 'button_buy_now.gif');
		$button = (LISTING_BUTTON == 'buy now & details' ? '<br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button($buypic, IMAGE_BUTTON_BUY_NOW, 'class="thm_buy_now"') . '</a> <span class="buy_now">|</span> ' . $link . tep_image_button('button_details_small.gif', IMAGE_BUTTON_DETAILS, 'class="thm_buy_now"') . '</a><br><br>' : (strstr(LISTING_BUTTON, 'buy now') ? '<br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button($buypic, IMAGE_BUTTON_BUY_NOW) . '</a><br><br>' : '<br>'. $link . tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS) . '</a><br><br>' )); 
			if (!strstr(PRODUCT_THUMBNAIL_VIEW, 'block'))	{			
			for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
	$lc_align = '';

	switch ($column_list[$col]) {
	  case 'PRODUCT_LIST_MODEL':
		$lc_align = 'center';
		$lc_text = ' ' . $listing['products_model'] . ' ';
		break;
	  case 'PRODUCT_LIST_NAME':
		$lc_align = 'center';
		$lc_text = $link.'<b>' . $listing['products_name'] . '</b></a>' . ($listing['short_desc'] && (PRODUCT_SHORT_DESC == 'true') ? '<br><span class="short">' . $listing['short_desc'] . '</span>' : '');
	   break;
	  case 'PRODUCT_LIST_MANUFACTURER':
		$lc_align = 'center';
		$lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> ';
		break;
	  case 'PRODUCT_LIST_PRICE':
		$lc_align = 'right';
					$price = (function_exists(display_short_price)) ? $currencies->display_short_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) : $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])); 
		if (tep_not_null($listing['specials_new_products_price'])) {
		  $lc_text = '<s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>  ';
		} else {
					   $lc_text = ($listing['products_price'] > 0 ? '' . $price . '  ' : ' ' . TEXT_POA); 
if (function_exists(tep_get_att_price)) $lc_text .= (tep_get_att_price($listing['products_id']) > 0 ? '+' : ' '); 
		}
		break;
	  case 'PRODUCT_LIST_QUANTITY':
		$lc_align = 'right';
		$lc_text = ' ' . $listing['products_quantity'] . ' ';
		break;
	  case 'PRODUCT_LIST_WEIGHT':
		$lc_align = 'right';
		$lc_text = ' ' . $listing['products_weight'] . ' ';
		break;
	  case 'PRODUCT_LIST_IMAGE':
		$lc_align = 'center';
		$lc_text = $link . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
		break;
	  case 'PRODUCT_LIST_BUY_NOW':
				  $lc_align = 'center';
		$lc_text = $button;
	   break;
	}
			$list_box_temp[] = array('align' => $lc_align,
							 'params' => 'class="productListing-data" width="'.(100/sizeof($column_list)).'%" ',
							 'text'  => $lc_text);
  }
	} else {  // block listing 
	$list_box_temp = array();
	if (PRODUCT_LIST_IMAGE) { $list_box_temp[] = array('align' => 'center',
																	   'params' => 'class="productListing-data" ',
							 											 'text'  => $link . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>');   }
		 $display ='';
	for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
	switch ($column_list[$col]) {
	  case 'PRODUCT_LIST_MODEL':
		$display .= $listing['products_model'] . '<br>';
		break;
	  case 'PRODUCT_LIST_NAME':
		$display .= $link.'<b><u>' . $listing['products_name'] . '</u></b></a><br>' . ($listing['short_desc'] && (PRODUCT_SHORT_DESC == 'true') ? '<span class="short">' . $listing['short_desc'] . '</span><br>' : '');
	   break;
	  case 'PRODUCT_LIST_MANUFACTURER':
		$display .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a><br>';
		break;
	  case 'PRODUCT_LIST_PRICE':
				  $display .= '<br>Price: ';
		$price = (function_exists(display_short_price)) ? $currencies->display_short_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) : $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])); 
		if (tep_not_null($listing['specials_new_products_price'])) {
		  $display .= '<s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span><br>';
		} else {
					   $display .= ($listing['products_price'] > 0 ? '' . $price : '' . TEXT_POA); 
if (function_exists(tep_get_att_price)) $display .= (tep_get_att_price($listing['products_id']) > 0 ? '+' : ' '); 
						 $display .= '<br>'; 
		}
		break;
	  case 'PRODUCT_LIST_QUANTITY':
		$display .=  ($listing['products_quantity'] ? 'Stock = ' . $listing['products_quantity'] : 'Out of Stock') . '<br>';
		break;
	  case 'PRODUCT_LIST_WEIGHT':
		$display .= 'Weight = ' . $listing['products_weight'].WEIGHT_ABRV.'<br />';
		break;
			}
		}	
$list_box_temp[] = array('align' => 'left',
						 'params' => 'class="main" valign="top"',
						 'text'  => $display);
	if (PRODUCT_LIST_BUY_NOW) {
		$list_box_temp[] = array('align' => 'left',
						 'params' => 'class="productListing-data" width="'.(100/4).'%" ',
						 'text'  => $button);
			}
	}
	return 	($list_box_temp);	
}
// function list_box_data end	

// set initial values	
$thumbnail_view = (isset($_GET['list']) ? $_GET['list'] : PRODUCT_THUMBNAIL_VIEW); 
$empty_list=false;
if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) {
$title_name = tep_get_manufacturer_name($_GET['manufacturers_id']);
} else {
$title_name = (!$category['categories_name'] && tep_not_null($_GET['cPath']) ? tep_get_category_name(substr($_GET['cPath'], strpos($_GET['cPath'],'_')+1),$languages_id) : '');
}
$grid = strstr(PRODUCT_THUMBNAIL_VIEW, 'grid');
$gborders = function_exists(mws_boxHeader);
$Tborder = (!$gborders ? '<table class="infoBoxList" width="100%"><tr><td>' : mws_boxHeader('<big>'.$title_name.'</big>'));
$Tborderend = (!$gborders ? '</td></tr></table>' : mws_boxFooter ());
$border2 = (!$gborders ? '<table class="infoBoxList" width="100%"><tr><td>' : ($graphic_bord == 'yes' ? mws_boxHeader('<big>'.$title_name.'</big>') : ''));  
$border2end = (!$gborders ? '</td></tr></table>' : ($graphic_bord == 'yes' ? mws_boxFooter() : ''));		
if (tep_not_null($_GET['categories_id']) && $current_category_id == 0) $current_category_id = $_GET['categories_id'];

// output selected display
if (strstr($thumbnail_view, 'thumbnails')) {  //thumbnail
 $row = 0;
 $col = 0;
 $border = (!$grid ? '<table class="infoBoxProducts" cellpadding="2" width="'.PRODUCT_LIST_WIDTH.'" height="'.PRODUCT_LIST_HEIGHT.'" ><tr><td valign="top">' : '<br>');
$borderend = (!$grid ? '</td></tr></table>' : '');
$style = (!$grid ? 'class="smallText"' : 'class="infoBoxGrid"');
$info_box_contents = array();
if ($listing_split->number_of_rows > 0) {   $listing_query = tep_db_query($listing_split->sql_query);} else {
	$listing_query = tep_db_query($listing_sql); }
if (tep_db_num_rows($listing_query)) { 			
while ($products = tep_db_fetch_array($listing_query)) {
 	if ($row == 0) { 
	  if (!$gborders && !$grid) $info_box_contents[$row][$col] = array('align' => 'center',
									   'params' => 'class="smallText" width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" valign="top"',
									   'text' =>  ' ');  
																				 echo $Tborder;$row ++;
				   }

		// build thumb
	$man_id = (tep_not_null($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : '');	
	$link = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id'] . ($man_id ? '&manufacturers_id='.$man_id : ($cPath && $cat_path ? '&cPath=' . $cPath : ''))) . '"' . ($man_id  || ($cat_path && $cat_path) ? ' rel="nofollow"' : '') . '>';
	$image = $products['products_image']; 
	$addimages = (file_exists(DIR_WS_CLASSES . 'displayimages.php')); // Additional Images Present
	if ($addimages) { 	
	$image_query = tep_db_query( "SELECT ai.medium_images, ai.images_description, ai.popup_images, p.products_image_med, p.products_image_description  FROM " .  TABLE_ADDITIONAL_IMAGES . " ai, " . TABLE_PRODUCTS . " p WHERE ai.products_id=p.products_id and ai.products_id = '".(int)$products['products_id']."'");
$selected_image = tep_db_fetch_array($image_query);
	$image = ($selected_image['medium_images'] ? $selected_image['medium_images'] : ($selected_image['products_image_med'] ? $selected_image['products_image_med'] : ($selected_image['popup_images'] ? $selected_image['popup_images'] : $products['products_image']))); 
										}
$alt_text = ($addimages ? (tep_not_null($selected_image['images_description']) ? $selected_image['images_description'] : (tep_not_null($selected_image['products_image_description']) ? $selected_image['products_image_description'] : $products['products_name'])) : $products['products_name']);  

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . $image, $alt_text, 200, '', 'class="large"')  . '</a></div>' . '<br>';

	$button = (LISTING_BUTTON != 'none' && PRODUCT_LIST_BUY_NOW ? (LISTING_BUTTON == 'buy now & details' ? '<br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products['products_id']) . '">' . tep_image_button($buypic, IMAGE_BUTTON_BUY_NOW, 'class="thm_buy_now"') . '</a> <span class="buy_now">|</span> ' . $link . tep_image_button('button_details_small.gif', IMAGE_BUTTON_DETAILS, 'class="thm_buy_now"') . '</a><br><br>' : (strstr(LISTING_BUTTON, 'buy now') ? '<br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products['products_id']) . '">' . tep_image_button($buypic, IMAGE_BUTTON_BUY_NOW) . '</a><br><br>' : '<br>' . $link . tep_image_button('button_details.png', IMAGE_BUTTON_DETAILS) . '</a><br><br>' )) : ' '); 

	$name =	$link . '<b>' . $products['products_name'] . '</b>' . '</a><br>'. ($products['short_desc'] && (PRODUCT_SHORT_DESC == 'true') ? '<br>' . $products['short_desc'] . '<br>' : '');	 
	$price = (function_exists(display_short_price)) ? $currencies->display_short_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) : $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])); 	
if (tep_not_null($products['specials_new_products_price'])) {
		 $price = '<s>' .  $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($products['specials_new_products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</span>';
		} 
	if (function_exists(tep_get_att_price)) $price .= (tep_get_att_price($products['products_id']) > 0 ? '+' : ''); 
	$show_price = '<br><font size="'.PRODUCT_PRICE_SIZE.'">' . ($products['products_price'] > 0 ? $price : TEXT_POA) . '<br></font>';
	$quantity = ($products['products_quantity'] ? 'Stock = '.$products['products_quantity'] : 'Out of Stock').'<br />';
	$weight = 'Weight = '.$products['products_weight'].WEIGHT_ABRV.'<br />';
$model = $products['products_model'] . '<br>';
	$manfact = '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $products['manufacturers_id']) . '">' . $products['manufacturers_name'] . '</a><br>';
	$display = $border;
	for ($disp=0, $n=sizeof($column_list); $disp<$n; $disp++) {
	switch ($column_list[$disp]) {
	  case 'PRODUCT_LIST_IMAGE':
				 $display .= '<table summary="" width="100%" ><tr><td style="text-align:center;" valign="top" height="'.PRODUCT_IMAGE_VSPACE.'" >'.$image. tep_image(DIR_WS_IMAGES . $listing['large_products_image'], $listing['products_name'], '', '', 'class="large"') .'</td></tr></table>';
		break;
				case 'PRODUCT_LIST_NAME':
		$display .= '<table summary="" width="100%" ><tr><td class="thumbcontent" height="'.PRODUCT_NAME_VSPACE.'" >'.$name.'</td></tr></table>';
		break;
		  case 'PRODUCT_LIST_MODEL':
$display .= '<table summary="" width="100%" ><tr><td class="thumbcontent">'.$model.'</td></tr></table>';
		break;
				case 'PRODUCT_LIST_MANUFACTURER':
		$display .= $manfact;
		break;
//					case 'PRODUCT_LIST_PRICE':   
//		   $display .= $show_price;
//			break;		
				case 'PRODUCT_LIST_QUANTITY':
		$display .= $quantity;
		break;	
				case 'PRODUCT_LIST_WEIGHT':
		$display .= $weight;
		break;	
				}
	}
	$display .= $borderend . $button;
			// thumb built			 


	 $info_box_contents[$row][$col] = array('align' => 'center',
  'params' => $style . ' width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" align="center" valign="top"',
									   'text' => $display );
	$col ++;
if ($col > PRODUCTS_PER_ROW-1) {
  $col = 0;
  $row ++;
}
}  // prod loop
} else {$empty_list=true; }// no products!!
// got display
if ($row) { 
$i = 0; $nbx = class_exists(noborderBox); if ($col > 0 && $row > 1 && $nbx && !$grid) { for ($i=0, $n=$col; $i < $n; $i++) { $last_row[0][$i] =  $info_box_contents[$row][$i]; unset($info_box_contents[$row][$i]); } }
if (!$i) {$col = 0;$row ++;$info_box_contents[$row][$col] = array('align' => 'center',
									   'params' => 'class="smallText" width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" ',
									   'text' =>  ' '); }
if ($nbx) new noborderBox($info_box_contents); else new contentBox($info_box_contents);
if($i) new noborderBox($last_row); 
echo $Tborderend;
							} else {$empty_list=true; }
} elseif (strstr($thumbnail_view, 'manufacturer')) {  //manufacturer

$row = 0;$col = 0;

if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) {
$filterlist_sql= tep_db_query("select distinct m.manufacturers_id, m.manufacturers_name, mi.manufacturers_description from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.languages_id = '" . (int)$languages_id . "'");
 }else{
$filterlist_sql= tep_db_query("select distinct m.manufacturers_id, m.manufacturers_name, mi.manufacturers_description  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id 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 . "' and mi.languages_id = '" . (int)$languages_id . "' order by m.manufacturers_name");
}
if (tep_db_num_rows($filterlist_sql)) { $rows = 0;
	while ($manufacturer = tep_db_fetch_array($filterlist_sql)) { 
	$info_box_heading = array(); if ($rows) echo tep_draw_separator('pixel_trans.gif', '100%', '4');	
	echo $border2; 
	$info_box_heading[0] = array('text' => '<big>'.$manufacturer['manufacturers_name'].'</big><br />'.(MANU_DESCRIPTION == 'true' ? $manufacturer['manufacturers_description'].'<br />' : ''));
	new infoBoxHeading($info_box_heading, false, false);	
	//echo tep_draw_separator('pixel_trans.gif', '100%', '2');		 
  $list_box_contents = array();
$list_box_contents[0] = (LISTING_HEADINGS == 'true' && !strstr(PRODUCT_THUMBNAIL_VIEW, 'block') ? list_box_head($column_list) : '');
if ($listing_split->number_of_rows > 0) { $rows = 0;  $listing_query = tep_db_query($listing_split->sql_query);} else {
  $rows = 0;  $listing_query = tep_db_query($listing_sql); }
while ($listing = tep_db_fetch_array($listing_query)) {
	if ($listing['manufacturers_id'] != $manufacturer['manufacturers_id']) continue;
  $rows++;

  $list_box_contents[] = (($rows/2) == floor($rows/2) ? array('params' => 'class="productListing-even"') : array('params' => 'class="productListing-odd"'));
  $cur_row = sizeof($list_box_contents) - 1;
		$list_box_contents[$cur_row] =	list_box_data($listing, $column_list);  
  }
  if (!$rows && isset($_GET['manufacturers_id'])) {
  $list_box_contents = array();
$list_box_contents[0] = array('params' => 'class="productListing-odd"');
$list_box_contents[0][] = array('params' => 'class="productListing-data"',
							   'text' => TEXT_NO_PRODUCTS); $rows++; }
  if ($rows) new productListingBox($list_box_contents); 
echo $border2end; 
}   // man loop;
	$col = 0;$row ++;$info_box_contents[$row][$col] = array('align' => 'center',
									   'params' => 'class="smallText" width="33%" valign="top"',
									   'text' =>  ' ');
} else {$empty_list=true; }  // no manufacturers!!
}
if ((!strstr($thumbnail_view, 'thumbnails') && !strstr($thumbnail_view, 'manufacturer')) || $empty_list) {   //default listing

 if (MANU_DESCRIPTION == 'true' && tep_not_null($_GET['manufacturers_id'])) { 
$manufacturer_query = tep_db_query("select manufacturers_description from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)($_GET['manufacturers_id']) . "' and languages_id = '" . (int)$languages_id . "'");
$manufacturer = tep_db_fetch_array($manufacturer_query); }

  $info_box_heading[0] = array('text' => '<big>'.$title_name.'</big>'.($manufacturer['manufacturers_description'] ? '<br />' . $manufacturer['manufacturers_description'] : ''));
 $list_box_contents = array();
  $list_box_contents[0] = (LISTING_HEADINGS == 'true' && !strstr(PRODUCT_THUMBNAIL_VIEW, 'block') ? list_box_head($column_list) : '');
  if ($listing_split->number_of_rows > 0) {  $rows = 0; $listing_query = tep_db_query($listing_split->sql_query);
while ($listing = tep_db_fetch_array($listing_query)) {
  $rows++;

 $list_box_contents[] = (($rows/2) == floor($rows/2) ? array('params' => 'class="productListing-even"') : array('params' => 'class="productListing-odd"'));
 $cur_row = sizeof($list_box_contents) - 1;

		$list_box_contents[$cur_row] =	list_box_data($listing, $column_list);  
}
	$empty_list = false;
	echo $border2; 
	if ($title_name) new infoBoxHeading($info_box_heading, false, false);	
new productListingBox($list_box_contents);
	echo $border2end; //tep_draw_separator('pixel_trans.gif', '100%', '4');
 } else {
$list_box_contents = array();

$list_box_contents[0] = array('params' => 'class="productListing-odd"');
$list_box_contents[0][] = array('params' => 'class="productListing-data"',
							   'text' => TEXT_NO_PRODUCTS);
new productListingBox($list_box_contents);
 }

 }
if ($base_nav && !$empty_list) echo $drop;
if (($listing_split->number_of_rows > (int)$max_results) && $base_nav) echo $page_nav;

if (!strstr(PRODUCT_THUMBNAIL_VIEW, 'list') && LISTING_SWITCH != 'false' && !$empty_list) echo '<br><span class="smalltext"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('list')). 'list='.(strstr($thumbnail_view, 'thumbnails') ? 'manufacturer' : 'thumbnails')) . '">' . (strstr($thumbnail_view, 'thumbnails') ? LIST_VIEW : THUMB_VIEW).'</a></span><br /><br />';
// echo '<hr>' . $listing_sql . '<hr>'; 

?>

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

<?php
/*
 $Id: product_listing.php,v 2.1.7 2008/07/24 22:49:59 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
$graphic_bord = 'no'; //  set to 'yes' if you have older 'graphic borders' and not 'easy graphic borders'.

$cat_path = false; // set to true to include category paths in urls

if (tep_not_null($HTTP_GET_VARS['sort'])) $_GET['sort'] = $HTTP_GET_VARS['sort'];
$max_results = (tep_not_null($_GET['max']) ? $_GET['max'] : MAX_DISPLAY_SEARCH_RESULTS);
if (PRODUCTS_PER_ROW == 'PRODUCTS_PER_ROW' || PRODUCTS_PER_ROW == 0 || LISTING_SWITCH == 'LISTING_SWITCH') { $to = 'Setup Error!\nPlease ensure you have run the\nProduct Listing Setup File.'; print "<script>alert('$to');</script>"; }

// sort order array
if ($_GET['sort'] == '0d') $sort_array[] = array('id' => 0 . 'd', 'text' => DATE_ORDER);
for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
  switch ($column_list[$i]) {
	case 'PRODUCT_LIST_MODEL':
			$sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_MODEL . APHA_ORDER);
	  break;
	case 'PRODUCT_LIST_NAME':
	  $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_PRODUCTS . APHA_ORDER);
	  break;
	case 'PRODUCT_LIST_MANUFACTURER':
	  $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_MANUFACTURER . APHA_ORDER);
	  break;
	case 'PRODUCT_LIST_QUANTITY':
	  $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_QUANTITY . NUM_ORDER);
	  break;
	case 'PRODUCT_LIST_WEIGHT':
	  $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_WEIGHT . NUM_ORDER);
	  break;
			case 'PRODUCT_LIST_PRICE':
			  $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_PRICE . NUM_ORDER);
	  break;	
  }
}
for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
  switch ($column_list[$i]) {
	case 'PRODUCT_LIST_MODEL':
			$sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_MODEL . REVERSE_ALPHA_ORDER);
	  break;
	case 'PRODUCT_LIST_NAME':
	  $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_PRODUCTS . REVERSE_ALPHA_ORDER);
	  break;
	case 'PRODUCT_LIST_MANUFACTURER':
	  $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_MANUFACTURER . REVERSE_ALPHA_ORDER);
	  break;
	case 'PRODUCT_LIST_QUANTITY':
	  $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_QUANTITY . REVERSE_NUM_ORDER);
	  break;
	case 'PRODUCT_LIST_WEIGHT':
	  $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_WEIGHT . REVERSE_NUM_ORDER);
	  break;
			case 'PRODUCT_LIST_PRICE':
			  $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_PRICE . REVERSE_NUM_ORDER);
	  break;	
  }
}	
// Max Results Array		
for ($i=1, $n=10; $i<$n; $i++) {		
	$max_display[] = array('id' => MAX_DISPLAY_SEARCH_RESULTS * $i, 'text' => MAX_DISPLAY_SEARCH_RESULTS * $i); 
	}	
	$max_display[] = array('id' => 1000000, 'text' => 'Show All');
// store GET vars		
$get_vars = '';
reset($_GET);
while (list($key, $value) = each($_GET)) {
  if ( ($key != 'sort') && ($key != 'max') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {
	$get_vars .= tep_draw_hidden_field($key, $value);
  }
}
$top_nav = ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'));
$base_nav = ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'));		
$listing_split = new splitPageResults($listing_sql, $max_results, 'p.products_id');

$page_nav = '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">' .  $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS) . '</td><td class="smallText" align="right">' . TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))) . '</td></tr></table>';
$drop = '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">Results/Page: '. tep_draw_form('maxdisplay', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . $get_vars . (isset($_GET['sort']) ? tep_draw_hidden_field('sort', $_GET['sort']) : '') .  tep_draw_pull_down_menu('max', $max_display, $_GET['max'], 'onChange="this.form.submit();"') . tep_hide_session_id().'</form></td><td class="smallText" align="right">Sort Order: ' . tep_draw_form('sorting', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . $get_vars . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : '') . tep_draw_pull_down_menu('sort', $sort_array, $_GET['sort'], 'onChange="this.form.submit();"') . tep_hide_session_id().'</form></td></tr></table>';
if ( ($listing_split->number_of_rows > (int)$max_results) && $top_nav ) echo $page_nav;
if ($top_nav && ($listing_split->number_of_rows > 0)) echo $drop;

function tep_get_category_name($category_id, $language_id) {
   $category_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id . "'");
 $category = tep_db_fetch_array($category_query);

  return $category['categories_name'];
 }
function tep_get_manufacturer_name($manufacturer_id) {
   $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$manufacturer_id . "'");
 $manufacturer = tep_db_fetch_array($manufacturers_query);

  return $manufacturer['manufacturers_name'];
 }

function list_box_head($column_list) {
 for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
switch ($column_list[$col]) {
  case 'PRODUCT_LIST_MODEL':
	$lc_text = TABLE_HEADING_MODEL;
	$lc_align = 'center';
	break;
  case 'PRODUCT_LIST_NAME':
	$lc_text = TABLE_HEADING_PRODUCTS;
	$lc_align = 'center';
	break;
  case 'PRODUCT_LIST_MANUFACTURER':
	$lc_text = TABLE_HEADING_MANUFACTURER;
	$lc_align = 'center';
	break;
  case 'PRODUCT_LIST_PRICE':
	$lc_text = TABLE_HEADING_PRICE;
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_QUANTITY':
	$lc_text = TABLE_HEADING_QUANTITY;
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_WEIGHT':
	$lc_text = TABLE_HEADING_WEIGHT;
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_IMAGE':
	$lc_text = TABLE_HEADING_IMAGE;
	$lc_align = 'center';
	break;
  case 'PRODUCT_LIST_BUY_NOW':
	$lc_text = (strstr(LISTING_BUTTON, 'buy now')? TABLE_HEADING_BUY_NOW : TABLE_HEADING_DETAIL);
	$lc_align = 'center';
	break;
}
if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
  $lc_text = tep_create_sort_heading($_GET['sort'], $col+1, $lc_text);
}
  $list_box_contents[] = array('align' => $lc_align,'params' => 'class="productListing-heading"','text' => ' ' . $lc_text . ' ');
 }
 return ($list_box_contents);
}
// function list_head end	

function list_box_data($listing, $column_list) {
	global $PHP_SELF, $cPath, $cat_path;
				$currencies = new currencies();
			$man_id = (tep_not_null($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : '');	
		$link = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id'] . ($man_id ? '&manufacturers_id='.$man_id : ($cPath && $cat_path ? '&cPath=' . $cPath : '')) ) . '"' . ($man_id || ($cat_path && $cat_path) ? ' rel="nofollow"' : '') . '>';
	$buypic = (LISTING_BUTTON == 'buy now' ? 'button_in_cart.gif' : 'button_buy_now.gif');
		$button = (LISTING_BUTTON == 'buy now & details' ? '<br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button($buypic, IMAGE_BUTTON_BUY_NOW, 'class="thm_buy_now"') . '</a> <span class="buy_now">|</span> ' . $link . tep_image_button('button_details_small.gif', IMAGE_BUTTON_DETAILS, 'class="thm_buy_now"') . '</a><br><br>' : (strstr(LISTING_BUTTON, 'buy now') ? '<br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button($buypic, IMAGE_BUTTON_BUY_NOW) . '</a><br><br>' : '<br>'. $link . tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS) . '</a><br><br>' )); 
			if (!strstr(PRODUCT_THUMBNAIL_VIEW, 'block'))	{			
			for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
	$lc_align = '';

	switch ($column_list[$col]) {
	  case 'PRODUCT_LIST_MODEL':
		$lc_align = 'center';
		$lc_text = ' ' . $listing['products_model'] . ' ';
		break;
	  case 'PRODUCT_LIST_NAME':
		$lc_align = 'center';
		$lc_text = $link.'<b>' . $listing['products_name'] . '</b></a>' . ($listing['short_desc'] && (PRODUCT_SHORT_DESC == 'true') ? '<br><span class="short">' . $listing['short_desc'] . '</span>' : '');
	   break;
	  case 'PRODUCT_LIST_MANUFACTURER':
		$lc_align = 'center';
		$lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> ';
		break;
	  case 'PRODUCT_LIST_PRICE':
		$lc_align = 'right';
					$price = (function_exists(display_short_price)) ? $currencies->display_short_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) : $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])); 
		if (tep_not_null($listing['specials_new_products_price'])) {
		  $lc_text = '<s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>  ';
		} else {
					   $lc_text = ($listing['products_price'] > 0 ? '' . $price . '  ' : ' ' . TEXT_POA); 
if (function_exists(tep_get_att_price)) $lc_text .= (tep_get_att_price($listing['products_id']) > 0 ? '+' : ' '); 
		}
		break;
	  case 'PRODUCT_LIST_QUANTITY':
		$lc_align = 'right';
		$lc_text = ' ' . $listing['products_quantity'] . ' ';
		break;
	  case 'PRODUCT_LIST_WEIGHT':
		$lc_align = 'right';
		$lc_text = ' ' . $listing['products_weight'] . ' ';
		break;
	  case 'PRODUCT_LIST_IMAGE':
		$lc_align = 'center';
		$lc_text = $link . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
		break;
	  case 'PRODUCT_LIST_BUY_NOW':
				  $lc_align = 'center';
		$lc_text = $button;
	   break;
	}
			$list_box_temp[] = array('align' => $lc_align,
							 'params' => 'class="productListing-data" width="'.(100/sizeof($column_list)).'%" ',
							 'text'  => $lc_text);
  }
	} else {  // block listing 
	$list_box_temp = array();
	if (PRODUCT_LIST_IMAGE) { $list_box_temp[] = array('align' => 'center',
																	   'params' => 'class="productListing-data" ',
							 											 'text'  => $link . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>');   }
		 $display ='';
	for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
	switch ($column_list[$col]) {
	  case 'PRODUCT_LIST_MODEL':
		$display .= $listing['products_model'] . '<br>';
		break;
	  case 'PRODUCT_LIST_NAME':
		$display .= $link.'<b><u>' . $listing['products_name'] . '</u></b></a><br>' . ($listing['short_desc'] && (PRODUCT_SHORT_DESC == 'true') ? '<span class="short">' . $listing['short_desc'] . '</span><br>' : '');
	   break;
	  case 'PRODUCT_LIST_MANUFACTURER':
		$display .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a><br>';
		break;
	  case 'PRODUCT_LIST_PRICE':
				  $display .= '<br>Price: ';
		$price = (function_exists(display_short_price)) ? $currencies->display_short_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) : $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])); 
		if (tep_not_null($listing['specials_new_products_price'])) {
		  $display .= '<s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span><br>';
		} else {
					   $display .= ($listing['products_price'] > 0 ? '' . $price : '' . TEXT_POA); 
if (function_exists(tep_get_att_price)) $display .= (tep_get_att_price($listing['products_id']) > 0 ? '+' : ' '); 
						 $display .= '<br>'; 
		}
		break;
	  case 'PRODUCT_LIST_QUANTITY':
		$display .=  ($listing['products_quantity'] ? 'Stock = ' . $listing['products_quantity'] : 'Out of Stock') . '<br>';
		break;
	  case 'PRODUCT_LIST_WEIGHT':
		$display .= 'Weight = ' . $listing['products_weight'].WEIGHT_ABRV.'<br />';
		break;
			}
		}	
$list_box_temp[] = array('align' => 'left',
						 'params' => 'class="main" valign="top"',
						 'text'  => $display);
	if (PRODUCT_LIST_BUY_NOW) {
		$list_box_temp[] = array('align' => 'left',
						 'params' => 'class="productListing-data" width="'.(100/4).'%" ',
						 'text'  => $button);
			}
	}
	return 	($list_box_temp);	
}
// function list_box_data end	

// set initial values	
$thumbnail_view = (isset($_GET['list']) ? $_GET['list'] : PRODUCT_THUMBNAIL_VIEW); 
$empty_list=false;
if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) {
$title_name = tep_get_manufacturer_name($_GET['manufacturers_id']);
} else {
$title_name = (!$category['categories_name'] && tep_not_null($_GET['cPath']) ? tep_get_category_name(substr($_GET['cPath'], strpos($_GET['cPath'],'_')+1),$languages_id) : '');
}
$grid = strstr(PRODUCT_THUMBNAIL_VIEW, 'grid');
$gborders = function_exists(mws_boxHeader);
$Tborder = (!$gborders ? '<table class="infoBoxList" width="100%"><tr><td>' : mws_boxHeader('<big>'.$title_name.'</big>'));
$Tborderend = (!$gborders ? '</td></tr></table>' : mws_boxFooter ());
$border2 = (!$gborders ? '<table class="infoBoxList" width="100%"><tr><td>' : ($graphic_bord == 'yes' ? mws_boxHeader('<big>'.$title_name.'</big>') : ''));  
$border2end = (!$gborders ? '</td></tr></table>' : ($graphic_bord == 'yes' ? mws_boxFooter() : ''));		
if (tep_not_null($_GET['categories_id']) && $current_category_id == 0) $current_category_id = $_GET['categories_id'];

// output selected display
if (strstr($thumbnail_view, 'thumbnails')) {  //thumbnail
 $row = 0;
 $col = 0;
 $border = (!$grid ? '<table class="infoBoxProducts" cellpadding="2" width="'.PRODUCT_LIST_WIDTH.'" height="'.PRODUCT_LIST_HEIGHT.'" ><tr><td valign="top">' : '<br>');
$borderend = (!$grid ? '</td></tr></table>' : '');
$style = (!$grid ? 'class="smallText"' : 'class="infoBoxGrid"');
$info_box_contents = array();
if ($listing_split->number_of_rows > 0) {   $listing_query = tep_db_query($listing_split->sql_query);} else {
	$listing_query = tep_db_query($listing_sql); }
if (tep_db_num_rows($listing_query)) { 			
while ($products = tep_db_fetch_array($listing_query)) {
 	if ($row == 0) { 
	  if (!$gborders && !$grid) $info_box_contents[$row][$col] = array('align' => 'center',
									   'params' => 'class="smallText" width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" valign="top"',
									   'text' =>  ' ');  
																				 echo $Tborder;$row ++;
				   }

		// build thumb
	$man_id = (tep_not_null($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : '');	
	$link = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id'] . ($man_id ? '&manufacturers_id='.$man_id : ($cPath && $cat_path ? '&cPath=' . $cPath : ''))) . '"' . ($man_id  || ($cat_path && $cat_path) ? ' rel="nofollow"' : '') . '>';
	$image = $products['products_image']; 
	$addimages = (file_exists(DIR_WS_CLASSES . 'displayimages.php')); // Additional Images Present
	if ($addimages) { 	
	$image_query = tep_db_query( "SELECT ai.medium_images, ai.images_description, ai.popup_images, p.products_image_med, p.products_image_description  FROM " .  TABLE_ADDITIONAL_IMAGES . " ai, " . TABLE_PRODUCTS . " p WHERE ai.products_id=p.products_id and ai.products_id = '".(int)$products['products_id']."'");
$selected_image = tep_db_fetch_array($image_query);
	$image = ($selected_image['medium_images'] ? $selected_image['medium_images'] : ($selected_image['products_image_med'] ? $selected_image['products_image_med'] : ($selected_image['popup_images'] ? $selected_image['popup_images'] : $products['products_image']))); 
										}
$alt_text = ($addimages ? (tep_not_null($selected_image['images_description']) ? $selected_image['images_description'] : (tep_not_null($selected_image['products_image_description']) ? $selected_image['products_image_description'] : $products['products_name'])) : $products['products_name']);  

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . $image, $alt_text, 200, '', 'class="large"')  . '</a></div>' . '<br>';

	$button = (LISTING_BUTTON != 'none' && PRODUCT_LIST_BUY_NOW ? (LISTING_BUTTON == 'buy now & details' ? '<br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products['products_id']) . '">' . tep_image_button($buypic, IMAGE_BUTTON_BUY_NOW, 'class="thm_buy_now"') . '</a> <span class="buy_now">|</span> ' . $link . tep_image_button('button_details_small.gif', IMAGE_BUTTON_DETAILS, 'class="thm_buy_now"') . '</a><br><br>' : (strstr(LISTING_BUTTON, 'buy now') ? '<br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products['products_id']) . '">' . tep_image_button($buypic, IMAGE_BUTTON_BUY_NOW) . '</a><br><br>' : '<br>' . $link . tep_image_button('button_details.png', IMAGE_BUTTON_DETAILS) . '</a><br><br>' )) : ' '); 

	$name =	$link . '<b>' . $products['products_name'] . '</b>' . '</a><br>'. ($products['short_desc'] && (PRODUCT_SHORT_DESC == 'true') ? '<br>' . $products['short_desc'] . '<br>' : '');	 
	$price = (function_exists(display_short_price)) ? $currencies->display_short_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) : $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])); 	
if (tep_not_null($products['specials_new_products_price'])) {
		 $price = '<s>' .  $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($products['specials_new_products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</span>';
		} 
	if (function_exists(tep_get_att_price)) $price .= (tep_get_att_price($products['products_id']) > 0 ? '+' : ''); 
	$show_price = '<br><font size="'.PRODUCT_PRICE_SIZE.'">' . ($products['products_price'] > 0 ? $price : TEXT_POA) . '<br></font>';
	$quantity = ($products['products_quantity'] ? 'Stock = '.$products['products_quantity'] : 'Out of Stock').'<br />';
	$weight = 'Weight = '.$products['products_weight'].WEIGHT_ABRV.'<br />';
$model = $products['products_model'] . '<br>';
	$manfact = '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $products['manufacturers_id']) . '">' . $products['manufacturers_name'] . '</a><br>';
	$display = $border;
	for ($disp=0, $n=sizeof($column_list); $disp<$n; $disp++) {
	switch ($column_list[$disp]) {
	  case 'PRODUCT_LIST_IMAGE':
				 $display .= '<table summary="" width="100%" ><tr><td style="text-align:center;" valign="top" height="'.PRODUCT_IMAGE_VSPACE.'" >'.$image. tep_image(DIR_WS_IMAGES . $listing['large_products_image'], $listing['products_name'], '', '', 'class="large"') .'</td></tr></table>';
		break;
				case 'PRODUCT_LIST_NAME':
		$display .= '<table summary="" width="100%" ><tr><td class="thumbcontent" height="'.PRODUCT_NAME_VSPACE.'" >'.$name.'</td></tr></table>';
		break;
		  case 'PRODUCT_LIST_MODEL':
$display .= '<table summary="" width="100%" ><tr><td class="thumbcontent">'.$model.'</td></tr></table>';
		break;
				case 'PRODUCT_LIST_MANUFACTURER':
		$display .= $manfact;
		break;
//					case 'PRODUCT_LIST_PRICE':   
//		   $display .= $show_price;
//			break;		
				case 'PRODUCT_LIST_QUANTITY':
		$display .= $quantity;
		break;	
				case 'PRODUCT_LIST_WEIGHT':
		$display .= $weight;
		break;	
				}
	}
	$display .= $borderend . $button;
			// thumb built			 


	 $info_box_contents[$row][$col] = array('align' => 'center',
  'params' => $style . ' width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" align="center" valign="top"',
									   'text' => $display );
	$col ++;
if ($col > PRODUCTS_PER_ROW-1) {
  $col = 0;
  $row ++;
}
}  // prod loop
} else {$empty_list=true; }// no products!!
// got display
if ($row) { 
$i = 0; $nbx = class_exists(noborderBox); if ($col > 0 && $row > 1 && $nbx && !$grid) { for ($i=0, $n=$col; $i < $n; $i++) { $last_row[0][$i] =  $info_box_contents[$row][$i]; unset($info_box_contents[$row][$i]); } }
if (!$i) {$col = 0;$row ++;$info_box_contents[$row][$col] = array('align' => 'center',
									   'params' => 'class="smallText" width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" ',
									   'text' =>  ' '); }
if ($nbx) new noborderBox($info_box_contents); else new contentBox($info_box_contents);
if($i) new noborderBox($last_row); 
echo $Tborderend;
							} else {$empty_list=true; }
} elseif (strstr($thumbnail_view, 'manufacturer')) {  //manufacturer

$row = 0;$col = 0;

if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) {
$filterlist_sql= tep_db_query("select distinct m.manufacturers_id, m.manufacturers_name, mi.manufacturers_description from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.languages_id = '" . (int)$languages_id . "'");
 }else{
$filterlist_sql= tep_db_query("select distinct m.manufacturers_id, m.manufacturers_name, mi.manufacturers_description  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id 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 . "' and mi.languages_id = '" . (int)$languages_id . "' order by m.manufacturers_name");
}
if (tep_db_num_rows($filterlist_sql)) { $rows = 0;
	while ($manufacturer = tep_db_fetch_array($filterlist_sql)) { 
	$info_box_heading = array(); if ($rows) echo tep_draw_separator('pixel_trans.gif', '100%', '4');	
	echo $border2; 
	$info_box_heading[0] = array('text' => '<big>'.$manufacturer['manufacturers_name'].'</big><br />'.(MANU_DESCRIPTION == 'true' ? $manufacturer['manufacturers_description'].'<br />' : ''));
	new infoBoxHeading($info_box_heading, false, false);	
	//echo tep_draw_separator('pixel_trans.gif', '100%', '2');		 
  $list_box_contents = array();
$list_box_contents[0] = (LISTING_HEADINGS == 'true' && !strstr(PRODUCT_THUMBNAIL_VIEW, 'block') ? list_box_head($column_list) : '');
if ($listing_split->number_of_rows > 0) { $rows = 0;  $listing_query = tep_db_query($listing_split->sql_query);} else {
  $rows = 0;  $listing_query = tep_db_query($listing_sql); }
while ($listing = tep_db_fetch_array($listing_query)) {
	if ($listing['manufacturers_id'] != $manufacturer['manufacturers_id']) continue;
  $rows++;

  $list_box_contents[] = (($rows/2) == floor($rows/2) ? array('params' => 'class="productListing-even"') : array('params' => 'class="productListing-odd"'));
  $cur_row = sizeof($list_box_contents) - 1;
		$list_box_contents[$cur_row] =	list_box_data($listing, $column_list);  
  }
  if (!$rows && isset($_GET['manufacturers_id'])) {
  $list_box_contents = array();
$list_box_contents[0] = array('params' => 'class="productListing-odd"');
$list_box_contents[0][] = array('params' => 'class="productListing-data"',
							   'text' => TEXT_NO_PRODUCTS); $rows++; }
  if ($rows) new productListingBox($list_box_contents); 
echo $border2end; 
}   // man loop;
	$col = 0;$row ++;$info_box_contents[$row][$col] = array('align' => 'center',
									   'params' => 'class="smallText" width="33%" valign="top"',
									   'text' =>  ' ');
} else {$empty_list=true; }  // no manufacturers!!
}
if ((!strstr($thumbnail_view, 'thumbnails') && !strstr($thumbnail_view, 'manufacturer')) || $empty_list) {   //default listing

 if (MANU_DESCRIPTION == 'true' && tep_not_null($_GET['manufacturers_id'])) { 
$manufacturer_query = tep_db_query("select manufacturers_description from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)($_GET['manufacturers_id']) . "' and languages_id = '" . (int)$languages_id . "'");
$manufacturer = tep_db_fetch_array($manufacturer_query); }

  $info_box_heading[0] = array('text' => '<big>'.$title_name.'</big>'.($manufacturer['manufacturers_description'] ? '<br />' . $manufacturer['manufacturers_description'] : ''));
 $list_box_contents = array();
  $list_box_contents[0] = (LISTING_HEADINGS == 'true' && !strstr(PRODUCT_THUMBNAIL_VIEW, 'block') ? list_box_head($column_list) : '');
  if ($listing_split->number_of_rows > 0) {  $rows = 0; $listing_query = tep_db_query($listing_split->sql_query);
while ($listing = tep_db_fetch_array($listing_query)) {
  $rows++;

 $list_box_contents[] = (($rows/2) == floor($rows/2) ? array('params' => 'class="productListing-even"') : array('params' => 'class="productListing-odd"'));
 $cur_row = sizeof($list_box_contents) - 1;

		$list_box_contents[$cur_row] =	list_box_data($listing, $column_list);  
}
	$empty_list = false;
	echo $border2; 
	if ($title_name) new infoBoxHeading($info_box_heading, false, false);	
new productListingBox($list_box_contents);
	echo $border2end; //tep_draw_separator('pixel_trans.gif', '100%', '4');
 } else {
$list_box_contents = array();

$list_box_contents[0] = array('params' => 'class="productListing-odd"');
$list_box_contents[0][] = array('params' => 'class="productListing-data"',
							   'text' => TEXT_NO_PRODUCTS);
new productListingBox($list_box_contents);
 }

 }
if ($base_nav && !$empty_list) echo $drop;
if (($listing_split->number_of_rows > (int)$max_results) && $base_nav) echo $page_nav;

if (!strstr(PRODUCT_THUMBNAIL_VIEW, 'list') && LISTING_SWITCH != 'false' && !$empty_list) echo '<br><span class="smalltext"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('list')). 'list='.(strstr($thumbnail_view, 'thumbnails') ? 'manufacturer' : 'thumbnails')) . '">' . (strstr($thumbnail_view, 'thumbnails') ? LIST_VIEW : THUMB_VIEW).'</a></span><br /><br />';
// echo '<hr>' . $listing_sql . '<hr>'; 

?>

In the file above perform the following steps:

Find and remove:

tep_image(DIR_WS_IMAGES . $listing['large_products_image'], $listing['products_name'], '', '', 'class="large"') .

Find:

tep_image(DIR_WS_IMAGES . $image, $alt_text, 200, '', 'class="large"')

and replace with

tep_image(DIR_WS_IMAGES . (tep_not_null($listing['large_products_image']) ? '$listing['large_products_image']' : '$image'), $alt_text, '', '', 'class="large"')

Link to comment
Share on other sites

gave me unexpected T_STRING on 297

 

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . (tep_not_null($listing['large_products_image']) ? '$listing['large_products_image']' : '$image'), $alt_text, '', '', 'class="large"')  . '</a></div>' . '<br>';

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

gave me unexpected T_STRING on 297

 

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . (tep_not_null($listing['large_products_image']) ? '$listing['large_products_image']' : '$image'), $alt_text, '', '', 'class="large"')  . '</a></div>' . '<br>';

Remove the single quotes from '$listing['large_products_image']' & '$image'

Output should look like

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . (tep_not_null($listing['large_products_image']) ? $listing['large_products_image'] : $image), $alt_text, '', '', 'class="large"')  . '</a></div>' . '<br>';

Link to comment
Share on other sites

yep.. now i lost ALL images in my product listing

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

yep.. now i lost ALL images in my product listing

try the following:

Change:

$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . (tep_not_null($listing['large_products_image']) ? $listing['large_products_image'] : $image), $alt_text, '', '', 'class="large"')  . '</a></div>' . '<br>';

to

if (tep_not_null($listing['large_products_image'])){$img_large = $listing['large_products_image'];}else{$img_large = $image;} 
$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . $img_large, $alt_text, '', '', 'class="large"')  . '</a></div>' . '<br>';

Link to comment
Share on other sites

still no.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

try the following:

Change:

if (tep_not_null($listing['large_products_image'])){$img_large = $listing['large_products_image'];}else{$img_large = $image;} 
$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . $img_large, $alt_text, '', '', 'class="large"')  . '</a></div>' . '<br>';

to

if (tep_not_null($listing['large_products_image'])){$img_large = $listing['large_products_image'];}else{$img_large = $image;} 
$image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br>' : '') . '<div id="pic">' . $link . tep_image(DIR_WS_IMAGES . $image, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="std"')  . tep_image(DIR_WS_IMAGES . $img_large, $alt_text, PRODUCT_IMAGE_WIDTH, '', 'class="large"')  . '</a></div>' . '<br>';

Link to comment
Share on other sites

nope.. no images, just filename now.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

no.. thre are NO images on my product listing now.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

ok..

maybe this will help.. I can do this with HTML, but not with php

pop up using css with DIFFERENT larger image

<a class="thumbnail" href="#thumb"><img src="media/tree_thumb.jpg" width="100px" height="66px" border="0" /><span><img src="media/tree.jpg" /><br />Simply beautiful.</span></a>

<a class="thumbnail" href="#thumb"><img src="media/ocean_thumb.jpg" width="100px" height="66px" border="0" /><span><img src="media/ocean.jpg" /><br />So real, it's unreal. Or is it?</span></a>

<br />
<br />

<a class="thumbnail" href="#thumb">Dynamic Drive<span><img src="media/dynamicdrive.gif" /><br />Dynamic Drive</span></a><br />
<a class="thumbnail" href="#thumb">Zoka Coffee<span><img src="media/zoka.gif" /><br />Zoka Coffee</span></a>

 

This is the css

<style type="text/css">

/*Credits: Dynamic Drive CSS Library */
/*URL: http://www.dynamicdrive.com/style/ */

.thumbnail{
position: relative;
z-index: 0;
}

.thumbnail:hover{
background-color: transparent;
z-index: 50;
}

.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: lightyellow;
padding: 5px;
left: -1000px;
border: 1px dashed gray;
visibility: hidden;
color: black;
text-decoration: none;
}

.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
}

.thumbnail:hover span{ /*CSS for enlarged image on hover*/
visibility: visible;
top: 0;
left: 60px; /*position where enlarged image should offset horizontally */

}

</style>

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

that did nothing..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...