Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I move the product title position on product_listing?


Guest

Recommended Posts

Posted

How do I change the position of the products' title on product listing from this:

 

old.jpg

 

To this below. I also need the cell to span across indicated by the red line.

 

new.jpg

 

Thanks.

Posted

I know this is beyond my brain capacity but surely someone on this forum has some idea how this ^^^ can be achieved? Any help no matter how small would be greatly appreciated.

Posted

The way the product listing is made is complex, we need to know what code you are using.is the code your using based on my contrib? I know u used it in the past?

 

 

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

Hi Sam, thanks for the reply. Yes I have your boarders contrib installed. Here is my complete product_listing code:

 

<form name="cart_multi" method="post" action="<?php echo tep_href_link(FILENAME_SHOPPING_CART, tep_get_all_get_params(array('action')) . 'action=add_multi', 'NONSSL'); ?>">
<script language=javascript> function changeValue(textObject,delta){  var myVal = parseInt(textObject.value);  if (myVal == NaN) {   myVal = 0;   } else {  myVal = myVal + delta;  }  /* check that it is not negetive */  if (myVal < 0) {  myVal = 0;  }  textObject.value = myVal;  return; } </script>
<?php
/*
 $Id: product_listing.php,v 2 2008/06/30 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
*/


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>"; }
$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');
 if ( ($listing_split->number_of_rows > (int)MAX_DISPLAY_SEARCH_RESULTS) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
   <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
   <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
 </tr>
</table>

<?php
}

function thumbnail($products,$manufacturer = NULL,$column_list,$border,$borderend,$PHP_SELF) {
   $currencies = new currencies();
	$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']))); 
										} 
   $image = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $image, ($addimages ? ($selected_image['images_description'] ? $selected_image['images_description'] : ($selected_image['products_image_description'] ? $selected_image['products_image_description'] : $products['products_name'])) : $products['products_name']), PRODUCT_IMAGE_WIDTH, '') . '</a>' . '<br><br>';
	$buypic = (LISTING_BUTTON == 'buy now' ? 'button_in_cart.gif' : 'button_buy_now.gif');
	$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> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . 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><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS) . '</a><br><br>' )) : ' '); 

	$name =	'<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">'. '<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'])); 					  
	$show_price = '<br><font size="'.PRODUCT_PRICE_SIZE.'">' . ($products['products_price'] > 0 ? $price : 'P.O.A') . '<br></font>';
	$quantity = ($products['products_quantity'] ? 'Stock = '.$products['products_quantity'] : 'Out of Stock').'<br />';
	$weight = 'Weight = '.$products['products_weight'].'Kg<br />';
   $model = $products['products_model'] . '<br>';
	$manfact = $products['manufacturers_name'].'<br />'.(MANU_DESCRIPTION == 'true' && $products['manufacturers_description'] ? $manufacturer['manufacturers_description'].'<br />' : '');
	$display = $border;
	for ($disp=0, $n=sizeof($column_list); $disp<$n; $disp++) {
       switch ($column_list[$disp]) {
         case 'PRODUCT_LIST_IMAGE':
				  $display .= $image;
           break;
				case 'PRODUCT_LIST_NAME':
           $display .= $name;
           break;
	      case 'PRODUCT_LIST_MODEL':
           $display .= $model;
           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;	
return($display);
}// thumb function end

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 = '';
       break;
     case 'PRODUCT_LIST_MANUFACTURER':
       $lc_text = TABLE_HEADING_MANUFACTURER;
       $lc_align = '';
       break;
     case 'PRODUCT_LIST_PRICE':
       $lc_text = TABLE_HEADING_PRICE;
       $lc_align = 'right';
       break;

case 'PRODUCT_LIST_PRICE_EX':
$lc_text = TABLE_HEADING_PRICE_EX;
$lc_align = 'center';
break;

     case 'PRODUCT_LIST_QUANTITY':
       $lc_text = TABLE_HEADING_QUANTITY;
       $lc_align = 'right';
       break;
     // START: display min. order. qty. mod
     case 'PRODUCT_LIST_MIN_ORDER_QTY':
       $lc_align = 'center';
       $lc_text = ' ' . TABLE_HEADING_MIN_ORDER_QTY . ' ';
       break;
     // END: display min. order. qty. mod
     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,$PHP_SELF) {
				$currencies = new currencies();
			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':
// BO Review Rating in Product Listing 1.0

 $reviews_query_raw = "select r.reviews_id, left(rd.reviews_id,100) as reviews_id, r.reviews_rating from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and rd.languages_id = '" . (int)$languages_id . "' and p.products_id = ". (int)$listing['products_id'] ." order by r.reviews_id DESC";
 $reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS);
   $compteurReview = 0;
   $noteReview = 0;
   $reviews_query = tep_db_query($reviews_split->sql_query);

   while ($reviews = tep_db_fetch_array($reviews_query)) {
$compteurReview +=1;
$noteReview += (int)$reviews['reviews_rating'];
}
// EO Review Rating in Product Listing 1.0
           $lc_align = '';
           if (isset($HTTP_GET_VARS['manufacturers_id'])) {
             $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . ' ' .  $category['categories_keyword'] .  '</a>';

// BO Review Rating in Product Listing 1.0
if ($compteurReview >0) {
$noteReview = $noteReview/$compteurReview;
$lc_text .= '<br><i><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS . '?products_id=' . $listing['products_id']) . '">' . sprintf(TEXT_REVIEW_RATING_ALG, tep_image(DIR_WS_IMAGES . 'stars_' . (int)$noteReview . '.gif', $noteReview .'/5'), $compteurReview) . '</a></i>';
}
// EO Review Rating in Product Listing 1.0
           } else {
            $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . ' ' . $category['categories_product_title'] .  '</a> ';
           }
if (PRODUCT_LIST_DESCRIPTION && $listing['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH)
           $lc_text .= '<br><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc">' . tep_flatten_product_description($listing['products_description'],  ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . TEXT_MORE . '</a>') . '</td></tr></table>';
           break;
         case 'PRODUCT_LIST_MANUFACTURER':
           $lc_align = '';
           $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';
           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><BR><span class="productSpecialPriceEX">(' . $currencies->display_price_ex($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ex.vat)</span>';

} else {
             $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '  <br><span class="productPriceEX">(' . $currencies->display_price_ex($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ex.vat)</span>';
                         }
           break;
         case 'PRODUCT_LIST_QUANTITY':
           $lc_align = 'right';
           $lc_text = ' ' . $listing['products_quantity'] . ' ';
           break;
         // START: display min. order. qty. mod
         case 'PRODUCT_LIST_MIN_ORDER_QTY':
           $lc_align = '';
           $lc_text = ' ' . $listing['products_min_order_qty'] . ' ';
           break;
         // END: display min. order. qty. mod
         case 'PRODUCT_LIST_WEIGHT':
           $lc_align = 'right';
           $lc_text = ' ' . $listing['products_weight'] . ' ';
           break;
         case 'PRODUCT_LIST_IMAGE':
           $lc_align = 'center';
           if (isset($_GET['manufacturers_id'])) {
             $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
           } else {
             $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';

// BO Review Rating in Product Listing 1.0
if ($compteurReview >0) {
$noteReview = $noteReview/$compteurReview;
$lc_text .= '<br><i><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS . '?products_id=' . $listing['products_id']) . '">' . sprintf(TEXT_REVIEW_RATING_ALG, tep_image(DIR_WS_IMAGES . 'stars_' . (int)$noteReview . '.gif', $noteReview .'/5'), $compteurReview) . '</a></i>';
}
// EO Review Rating in Product Listing 1.0
}

           break;
         case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
if ($listing['products_free_shipping'] == true) { 
$lc_text = '<Table><span class="productPriceEX">' . FREE_SHIPPING_FOR_THIS_PRODUCT . '</span><td><input type="text" STYLE="text-align:center" name="add_id['.$number_of_products.']"  id="add_id_'.$listing['products_id'].'" value="0" size="1"><td><img src="images/btn-up.gif" border="0" width=21 height=11 onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing['products_id'].'\'),1);return  false;"><br><img src="images/btn-dn.gif" border="0" width=21 height=11 onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing['products_id'].'\'),-1);return  false; "></td></Table>';            
//$lc_text  = '<input type="text" STYLE="text-align:center" name="add_id['.$number_of_products.']" value="0" size="1"> ' . FREE_SHIPPING_FOR_THIS_PRODUCT . '';
           $lc_text .= '<input type="hidden" name="products_id['.$number_of_products.']" value="'.$listing['products_id'].'">';

} else {
$lc_text  = '<input type="text" name="add_id['.$number_of_products.']" value="0" size="1">';
$lc_text = '<Table><td><input type="text" STYLE="text-align:center" name="add_id['.$number_of_products.']"  id="add_id_'.$listing['products_id'].'" value="0" size="1"><td><img src="images/btn-up.gif" border="0" width=21 height=11 onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing['products_id'].'\'),1);return  false;"><br><img src="images/btn-dn.gif" border="0" width=21 height=11 onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing['products_id'].'\'),-1);return  false; "></td></Table>';           
$lc_text .= '<input type="hidden" name="products_id['.$number_of_products.']" value="'.$listing['products_id'].'">';
          }
           break;
       }
			$list_box_temp[] = array('align' => $lc_align,
                                'params' => 'class="productListing-data" width="'.($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'  => (isset($_GET['manufacturers_id']) ? '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>' : '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . 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':
           if (isset($_GET['manufacturers_id'])) {
              $display .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . 
$_GET['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '"><b><u>' . $listing['products_name'] . '</u></b></a><br>' . ($listing['short_desc'] && (PRODUCT_SHORT_DESC == 'true') ? '<span class="short">' . $listing['short_desc'] . '</span><br>' : '');
               } else {
              $display .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . 
$listing['products_id']) . '"><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'] . '<br>';
           break;
			}

		}	
$list_box_temp[] = array('align' => 'left',
                            'params' => 'class="main" valign="top"',
                            'text'  => $display);
	if (PRODUCT_LIST_BUY_NOW) {
		$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> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . 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><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS) . '</a><br><br>' )) ; 
	$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($HTTP_GET_VARS['list']) ? $HTTP_GET_VARS['list'] : PRODUCT_THUMBNAIL_VIEW); 
$empty_list=false;
$grid = strstr(PRODUCT_THUMBNAIL_VIEW, 'grid');
$gborders = function_exists(mws_boxHeader);
$Tborder = (!$gborders ? '<table class="infoBoxList" width="100%"><tr><td>' : mws_boxHeader ());
$Tborderend = (!$gborders ? '</td></tr></table>' : mws_boxFooter ());
$border2 = (!$gborders ? '<table class="infoBoxList" width="100%"><tr><td>' : ($graphic_bord == 'yes' ? mws_boxHeader() : ''));  
$border2end = (!$gborders ? '</td></tr></table>' : ($graphic_bord == 'yes' ? mws_boxFooter() : ''));		


// output selected display
if (strstr($thumbnail_view, 'thumbnails')) {  //thumbnail
 $row = 0;
 $col = 0;
 $border = (!$grid ? '<table class="infoBoxProducts" cellpadding="4" width="'.PRODUCT_LIST_WIDTH.'" height="'.PRODUCT_LIST_HEIGHT.'"><tr><td>' : '<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 ++;
	               }
	 $info_box_contents[$row][$col] = array('align' => 'center',
                                          'params' => $style . ' width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" valign="top"',
                                          'text' => thumbnail($products, '',$column_list,$border,$borderend,$PHP_SELF));
	$col ++;
   if ($col > PRODUCTS_PER_ROW-1) {
     $col = 0;
     $row ++;
   }
}  // prod loop
} else {$empty_list=true; }// no products!!
// got display
if ($row) { $col = 0;$row ++;$info_box_contents[$row][$col] = array('align' => 'center',
                                          'params' => 'class="smallText" width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" ',
                                          'text' =>  ' ');
if ($gborders && class_exists(noborderBox)) new noborderBox($info_box_contents); else new contentBox($info_box_contents);
echo $Tborderend;
 							  } else {$empty_list=true; }
} elseif (strstr($thumbnail_view, 'manufacturer')) {  //manufacturer

$row = 0;$col = 0;

if (!isset($_GET['manufacturers_id'])) {
$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");
}else{$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 . "'");}
if (tep_db_num_rows($filterlist_sql)) { 	 
               echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align="right"');

               while ($manufacturer = tep_db_fetch_array($filterlist_sql)) {     		
               $info_box_heading = array();
	echo $border2; 
	$info_box_heading[0] = array('text' => ''.$manufacturer['manufacturers_name'].' • '.$category['categories_name'].' <br />'.(MANU_DESCRIPTION == 'true' ? $manufacturer['manufacturers_description'].'<br />' : ''));
	new infoBoxHeading($info_box_heading, false, false);	
	echo tep_draw_separator('pixel_trans.gif', '100%', '20');		 
  $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 {
       $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,$PHP_SELF);  
  }
  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 . tep_draw_separator('pixel_trans.gif', '100%', '4');

   echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART,'align="right"');
}   // 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

  $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,$PHP_SELF);  
   }
   new productListingBox($list_box_contents);
 } 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 ( ($listing_split->number_of_rows > (int)MAX_DISPLAY_SEARCH_RESULTS) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
   <td align="right" class="main"><?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
 </tr>
</table>
<?php echo tep_draw_separator('pixel_trans.gif', '100%', '20');?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
   <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
   <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
</tr>
</table>


<?php
 }
echo tep_draw_separator('pixel_trans.gif', '100%', '100');					
if (!strstr(PRODUCT_THUMBNAIL_VIEW, 'list') && LISTING_SWITCH != 'false') echo '<br><span class="smalltext"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('list')). 'list='.($thumbnail_view == 'thumbnails' ? 'manufacturer' : 'thumbnails')) . '">' . ($thumbnail_view == 'thumbnails' ? 'List View' : 'Thumbnail View').'</a></span><br /><br />';


?>
</form>

Posted

As I thought, thats a modified version of an early Product Listing Enhancements, Thumbnails & Manufacturer Headings http://addons.oscommerce.com/info/6051 , nothing like the standard code, as I had re-written it.

 

First you must remove the name from its existing place, in this block (line 149 on)

 

 

case 'PRODUCT_LIST_NAME':
// BO Review Rating in Product Listing 1.0

$reviews_query_raw = "select r.reviews_id, left(rd.reviews_id,100) as reviews_id, r.reviews_rating from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and rd.languages_id = '" . (int)$languages_id . "' and p.products_id = ". (int)$listing['products_id'] ." order by r.reviews_id DESC";
$reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS);
$compteurReview = 0;
$noteReview = 0;
$reviews_query = tep_db_query($reviews_split->sql_query);

while ($reviews = tep_db_fetch_array($reviews_query)) {
$compteurReview +=1;
$noteReview += (int)$reviews['reviews_rating'];
}
// EO Review Rating in Product Listing 1.0
$lc_align = '';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . ' ' . $category['categories_keyword'] . '</a>';

// BO Review Rating in Product Listing 1.0
if ($compteurReview >0) {
$noteReview = $noteReview/$compteurReview;
$lc_text .= '
<i><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS . '?products_id=' . $listing['products_id']) . '">' . sprintf(TEXT_REVIEW_RATING_ALG, tep_image(DIR_WS_IMAGES . 'stars_' . (int)$noteReview . '.gif', $noteReview .'/5'), $compteurReview) . '</a></i>';
}
// EO Review Rating in Product Listing 1.0
} else {
$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . ' ' . $category['categories_product_title'] . '</a> ';
}
if (PRODUCT_LIST_DESCRIPTION && $listing['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH)
$lc_text .= '
<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc">' . tep_flatten_product_description($listing['products_description'], ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . TEXT_MORE . '</a>') . '</td></tr></table>';
break;

 

remove any:

 

$listing['products_name']

 

then find (395):

 

$cur_row = sizeof($list_box_contents) - 1;

$list_box_contents[$cur_row] = list_box_data($listing, $column_list,$PHP_SELF); 
}
new productListingBox($list_box_contents);

 

replace with:

 

$cur_row = sizeof($list_box_contents) - 1;
$list_box_contents[$cur_row][] = array('align' => 'left',
                                  		'params' => 'colspan="'.sizeof($column_list).'"',
                                  		'text' =>  '<b>' . $listing['products_name'] . '</b>');   
$list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF); 
}
new productListingBox($list_box_contents);

 

Not tested, let me know how you get on. smile.gif

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

how do i find the product listing file and also if i copy your code will i get the same product layout as you

thanks in advance

Posted

Sam, no go I'm afraid. The product title doesn’t even show up, see here: (this is test site)

 

http://www.cfbsupplies.co.uk/expsite/index.php?cPath=2789_21_4053

 

 

 

@Yousef, the product listing can be found catalog/includes/modules/product_listing.php. simply copying and pasting won;t work, you need to install the Product Listing Enhancements, Thumbnails & Manufacturer Headings http://addons.oscommerce.com/info/6051 that Sam wrote.

Posted

looking at your source I don`t think you made the change exactly as I said, as the row is missing!!

 

the line

 

$list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF);

 

must have the +1 now, or you delete the new row!!

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

looking at your source I don`t think you made the change exactly as I said, as the row is missing!!

 

the line

 

$list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF);

 

must have the +1 now, or you delete the new row!!

 

 

Sorry, I don't understand what you mean. That line of code is definitely in product listing. Please explain.

Posted

Change to the latest code snippit there, this will work!!

 

you have now:

 

 

$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][] = array('align' => 'left',
                                      	'params' => 'colspan="'.sizeof($column_list).'"',
                                      	'text' =>  '<b>' . $listing['products_name'] . '</b>');   
$list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF); 
}
new productListingBox($list_box_contents);

 

replace with:

 

 

$rows++;

$cur_row = sizeof($list_box_contents);
$list_box_contents[$cur_row][] = array('align' => 'left',
                                      	'params' => 'colspan="'.sizeof($column_list).'"',
                                      	'text' =>  '<b>' . $listing['products_name'] . '</b>');   
$list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF); 
}
new productListingBox($list_box_contents);

 

 

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

Still no good: http://www.cfbsupplies.co.uk/expsite/index.php?cPath=2789_21_4053

 

Here's me product_listing as it is now:

 

 

<form name="cart_multi" method="post" action="<?php echo tep_href_link(FILENAME_SHOPPING_CART, tep_get_all_get_params(array('action')) . 'action=add_multi', 'NONSSL'); ?>">
<script language=javascript> function changeValue(textObject,delta){  var myVal = parseInt(textObject.value);  if (myVal == NaN) {   myVal = 0;   } else {  myVal = myVal + delta;  }  /* check that it is not negetive */  if (myVal < 0) {  myVal = 0;  }  textObject.value = myVal;  return; } </script>
<?php
/*
 $Id: product_listing.php,v 2 2008/06/30 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
*/


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>"; }
$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');
 if ( ($listing_split->number_of_rows > (int)MAX_DISPLAY_SEARCH_RESULTS) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
   <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
   <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
 </tr>
</table>

<?php
}

function thumbnail($products,$manufacturer = NULL,$column_list,$border,$borderend,$PHP_SELF) {
   $currencies = new currencies();
	$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']))); 
										} 
   $image = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $image, ($addimages ? ($selected_image['images_description'] ? $selected_image['images_description'] : ($selected_image['products_image_description'] ? $selected_image['products_image_description'] : $products['products_name'])) : $products['products_name']), PRODUCT_IMAGE_WIDTH, '') . '</a>' . '<br><br>';
	$buypic = (LISTING_BUTTON == 'buy now' ? 'button_in_cart.gif' : 'button_buy_now.gif');
	$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> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . 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><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS) . '</a><br><br>' )) : ' '); 

	$name =	'<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">'. '<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'])); 					  
	$show_price = '<br><font size="'.PRODUCT_PRICE_SIZE.'">' . ($products['products_price'] > 0 ? $price : 'P.O.A') . '<br></font>';
	$quantity = ($products['products_quantity'] ? 'Stock = '.$products['products_quantity'] : 'Out of Stock').'<br />';
	$weight = 'Weight = '.$products['products_weight'].'Kg<br />';
   $model = $products['products_model'] . '<br>';
	$manfact = $products['manufacturers_name'].'<br />'.(MANU_DESCRIPTION == 'true' && $products['manufacturers_description'] ? $manufacturer['manufacturers_description'].'<br />' : '');
	$display = $border;
	for ($disp=0, $n=sizeof($column_list); $disp<$n; $disp++) {
       switch ($column_list[$disp]) {
         case 'PRODUCT_LIST_IMAGE':
				  $display .= $image;
           break;
				case 'PRODUCT_LIST_NAME':
           $display .= $name;
           break;
	      case 'PRODUCT_LIST_MODEL':
           $display .= $model;
           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;	
return($display);
}// thumb function end

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 = '';
       break;
     case 'PRODUCT_LIST_MANUFACTURER':
       $lc_text = TABLE_HEADING_MANUFACTURER;
       $lc_align = '';
       break;
     case 'PRODUCT_LIST_PRICE':
       $lc_text = TABLE_HEADING_PRICE;
       $lc_align = 'right';
       break;

case 'PRODUCT_LIST_PRICE_EX':
$lc_text = TABLE_HEADING_PRICE_EX;
$lc_align = 'center';
break;

     case 'PRODUCT_LIST_QUANTITY':
       $lc_text = TABLE_HEADING_QUANTITY;
       $lc_align = 'right';
       break;
     // START: display min. order. qty. mod
     case 'PRODUCT_LIST_MIN_ORDER_QTY':
       $lc_align = 'center';
       $lc_text = ' ' . TABLE_HEADING_MIN_ORDER_QTY . ' ';
       break;
     // END: display min. order. qty. mod
     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,$PHP_SELF) {
				$currencies = new currencies();
			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':
// BO Review Rating in Product Listing 1.0

 $reviews_query_raw = "select r.reviews_id, left(rd.reviews_id,100) as reviews_id, r.reviews_rating from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and rd.languages_id = '" . (int)$languages_id . "' and p.products_id = ". (int)$listing['products_id'] ." order by r.reviews_id DESC";
 $reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS);
   $compteurReview = 0;
   $noteReview = 0;
   $reviews_query = tep_db_query($reviews_split->sql_query);

   while ($reviews = tep_db_fetch_array($reviews_query)) {
$compteurReview +=1;
$noteReview += (int)$reviews['reviews_rating'];
}
// EO Review Rating in Product Listing 1.0
           $lc_align = '';
           if (isset($HTTP_GET_VARS['manufacturers_id'])) {
             $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">  ' .  $category['categories_keyword'] .  '</a>';

// BO Review Rating in Product Listing 1.0
if ($compteurReview >0) {
$noteReview = $noteReview/$compteurReview;
$lc_text .= '<br><i><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS . '?products_id=' . $listing['products_id']) . '">' . sprintf(TEXT_REVIEW_RATING_ALG, tep_image(DIR_WS_IMAGES . 'stars_' . (int)$noteReview . '.gif', $noteReview .'/5'), $compteurReview) . '</a></i>';
}
// EO Review Rating in Product Listing 1.0
           } else {
            $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">  ' . $category['categories_product_title'] .  '</a> ';
           }
if (PRODUCT_LIST_DESCRIPTION && $listing['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH)
           $lc_text .= '<br><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc">' . tep_flatten_product_description($listing['products_description'],  ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . TEXT_MORE . '</a>') . '</td></tr></table>';
           break;









         case 'PRODUCT_LIST_MANUFACTURER':
           $lc_align = '';
           $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';
           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><BR><span class="productSpecialPriceEX">(' . $currencies->display_price_ex($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ex.vat)</span>';

} else {
             $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '  <br><span class="productPriceEX">(' . $currencies->display_price_ex($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ex.vat)</span>';
                         }
           break;
         case 'PRODUCT_LIST_QUANTITY':
           $lc_align = 'right';
           $lc_text = ' ' . $listing['products_quantity'] . ' ';
           break;
         // START: display min. order. qty. mod
         case 'PRODUCT_LIST_MIN_ORDER_QTY':
           $lc_align = '';
           $lc_text = ' ' . $listing['products_min_order_qty'] . ' ';
           break;
         // END: display min. order. qty. mod
         case 'PRODUCT_LIST_WEIGHT':
           $lc_align = 'right';
           $lc_text = ' ' . $listing['products_weight'] . ' ';
           break;
         case 'PRODUCT_LIST_IMAGE':
           $lc_align = 'center';
           if (isset($_GET['manufacturers_id'])) {
             $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
           } else {
             $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';

// BO Review Rating in Product Listing 1.0
if ($compteurReview >0) {
$noteReview = $noteReview/$compteurReview;
$lc_text .= '<br><i><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS . '?products_id=' . $listing['products_id']) . '">' . sprintf(TEXT_REVIEW_RATING_ALG, tep_image(DIR_WS_IMAGES . 'stars_' . (int)$noteReview . '.gif', $noteReview .'/5'), $compteurReview) . '</a></i>';
}
// EO Review Rating in Product Listing 1.0
}

           break;
         case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
if ($listing['products_free_shipping'] == true) { 
$lc_text = '<Table><span class="productPriceEX">' . FREE_SHIPPING_FOR_THIS_PRODUCT . '</span><td><input type="text" STYLE="text-align:center" name="add_id['.$number_of_products.']"  id="add_id_'.$listing['products_id'].'" value="0" size="1"><td><img src="images/btn-up.gif" border="0" width=21 height=11 onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing['products_id'].'\'),1);return  false;"><br><img src="images/btn-dn.gif" border="0" width=21 height=11 onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing['products_id'].'\'),-1);return  false; "></td></Table>';            
//$lc_text  = '<input type="text" STYLE="text-align:center" name="add_id['.$number_of_products.']" value="0" size="1"> ' . FREE_SHIPPING_FOR_THIS_PRODUCT . '';
           $lc_text .= '<input type="hidden" name="products_id['.$number_of_products.']" value="'.$listing['products_id'].'">';

} else {
$lc_text  = '<input type="text" name="add_id['.$number_of_products.']" value="0" size="1">';
$lc_text = '<Table><td><input type="text" STYLE="text-align:center" name="add_id['.$number_of_products.']"  id="add_id_'.$listing['products_id'].'" value="0" size="1"><td><img src="images/btn-up.gif" border="0" width=21 height=11 onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing['products_id'].'\'),1);return  false;"><br><img src="images/btn-dn.gif" border="0" width=21 height=11 onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing['products_id'].'\'),-1);return  false; "></td></Table>';           
$lc_text .= '<input type="hidden" name="products_id['.$number_of_products.']" value="'.$listing['products_id'].'">';
          }
           break;
       }
			$list_box_temp[] = array('align' => $lc_align,
                                'params' => 'class="productListing-data" width="'.($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'  => (isset($_GET['manufacturers_id']) ? '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>' : '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . 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':
           if (isset($_GET['manufacturers_id'])) {
              $display .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . 
$_GET['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '"><b><u>' . $listing['products_name'] . '</u></b></a><br>' . ($listing['short_desc'] && (PRODUCT_SHORT_DESC == 'true') ? '<span class="short">' . $listing['short_desc'] . '</span><br>' : '');
               } else {
              $display .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . 
$listing['products_id']) . '"><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'] . '<br>';
           break;
			}

		}	
$list_box_temp[] = array('align' => 'left',
                            'params' => 'class="main" valign="top"',
                            'text'  => $display);
	if (PRODUCT_LIST_BUY_NOW) {
		$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> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . 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><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS) . '</a><br><br>' )) ; 
	$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($HTTP_GET_VARS['list']) ? $HTTP_GET_VARS['list'] : PRODUCT_THUMBNAIL_VIEW); 
$empty_list=false;
$grid = strstr(PRODUCT_THUMBNAIL_VIEW, 'grid');
$gborders = function_exists(mws_boxHeader);
$Tborder = (!$gborders ? '<table class="infoBoxList" width="100%"><tr><td>' : mws_boxHeader ());
$Tborderend = (!$gborders ? '</td></tr></table>' : mws_boxFooter ());
$border2 = (!$gborders ? '<table class="infoBoxList" width="100%"><tr><td>' : ($graphic_bord == 'yes' ? mws_boxHeader() : ''));  
$border2end = (!$gborders ? '</td></tr></table>' : ($graphic_bord == 'yes' ? mws_boxFooter() : ''));		


// output selected display
if (strstr($thumbnail_view, 'thumbnails')) {  //thumbnail
 $row = 0;
 $col = 0;
 $border = (!$grid ? '<table class="infoBoxProducts" cellpadding="4" width="'.PRODUCT_LIST_WIDTH.'" height="'.PRODUCT_LIST_HEIGHT.'"><tr><td>' : '<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 ++;
	               }
	 $info_box_contents[$row][$col] = array('align' => 'center',
                                          'params' => $style . ' width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" valign="top"',
                                          'text' => thumbnail($products, '',$column_list,$border,$borderend,$PHP_SELF));
	$col ++;
   if ($col > PRODUCTS_PER_ROW-1) {
     $col = 0;
     $row ++;
   }
}  // prod loop
} else {$empty_list=true; }// no products!!
// got display
if ($row) { $col = 0;$row ++;$info_box_contents[$row][$col] = array('align' => 'center',
                                          'params' => 'class="smallText" width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" ',
                                          'text' =>  ' ');
if ($gborders && class_exists(noborderBox)) new noborderBox($info_box_contents); else new contentBox($info_box_contents);
echo $Tborderend;
 							  } else {$empty_list=true; }
} elseif (strstr($thumbnail_view, 'manufacturer')) {  //manufacturer

$row = 0;$col = 0;

if (!isset($_GET['manufacturers_id'])) {
$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");
}else{$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 . "'");}
if (tep_db_num_rows($filterlist_sql)) { 	 
               echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align="right"');

               while ($manufacturer = tep_db_fetch_array($filterlist_sql)) {     		
               $info_box_heading = array();
	echo $border2; 
	$info_box_heading[0] = array('text' => ''.$manufacturer['manufacturers_name'].' • '.$category['categories_name'].' <br />'.(MANU_DESCRIPTION == 'true' ? $manufacturer['manufacturers_description'].'<br />' : ''));
	new infoBoxHeading($info_box_heading, false, false);	
	echo tep_draw_separator('pixel_trans.gif', '100%', '20');		 
  $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 {
       $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,$PHP_SELF);  
  }
  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 . tep_draw_separator('pixel_trans.gif', '100%', '4');

   echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART,'align="right"');
}   // 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

  $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++;

$cur_row = sizeof($list_box_contents);
$list_box_contents[$cur_row][] = array('align' => 'left',
                                       'params' => 'colspan="'.sizeof($column_list).'"',
                                       'text' =>  '<b>' . $listing['products_name'] . '</b>');   
$list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF); 
}
new productListingBox($list_box_contents);

 } 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 ( ($listing_split->number_of_rows > (int)MAX_DISPLAY_SEARCH_RESULTS) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
   <td align="right" class="main"><?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
 </tr>
</table>
<?php echo tep_draw_separator('pixel_trans.gif', '100%', '20');?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
   <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
   <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
</tr>
</table>


<?php
 }
echo tep_draw_separator('pixel_trans.gif', '100%', '100');					
if (!strstr(PRODUCT_THUMBNAIL_VIEW, 'list') && LISTING_SWITCH != 'false') echo '<br><span class="smalltext"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('list')). 'list='.($thumbnail_view == 'thumbnails' ? 'manufacturer' : 'thumbnails')) . '">' . ($thumbnail_view == 'thumbnails' ? 'List View' : 'Thumbnail View').'</a></span><br /><br />';


?>
</form>

Posted

Odd, the new lines work fine on my test server!!

 

Perhaps there is smthg odd with your box class.

 

Replace the

 

$list_box_contents[$cur_row][] = array('align' => 'left',
                                       'params' => 'colspan="'.sizeof($column_list).'"',
                                       'text' =>  '<b>' . $listing['products_name'] . '</b>');

with

 

$list_box_contents[$cur_row] = array('align' => 'left',
                                       'params' => 'colspan="'.sizeof($column_list).'"',
                                       'text' =>  '<b>' . $listing['products_name'] . '</b>');

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

??? what versions are u using (osc php etc)

 

comment out the line

 

$list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF);

 

that should then give u just the title.

 

Also what r your admin settings for the listing.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

??? what versions are u using (osc php etc)

 

comment out the line

 

$list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF);

 

that should then give u just the title.

 

Also what r your admin settings for the listing.

 

 

Removing: $list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF); didn;t make any difference. Using version osCommerce 2.2-MS2. Admin settigns for my product_listing below:

 

screen1.jpg

Posted

Ahhh!

 

Wev'e been editing the wrong bit!! I assumed a different mode!

 

line 366

 

 $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,$PHP_SELF); 

 

replace with:

 

 

$rows++;

$cur_row = sizeof($list_box_contents);
$list_box_contents[$cur_row] = array('align' => 'left',
                                      	'params' => 'colspan="'.sizeof($column_list).'"',
                                      	'text' =>  '<b>' . $listing['products_name'] . '</b>');
$list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF); 

 

 

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

Right, the product title is now in the right position but it not linked and isn't formatted (text style etc):

http://www.cfbsupplies.co.uk/expsite/index.php?cPath=2789_21_4053

 

I have tried changing this:

 

 

$rows++;

$cur_row = sizeof($list_box_contents);
$list_box_contents[$cur_row] = array('align' => 'left',
                                       'params' => 'colspan="'.sizeof($column_list).'"',
                                       'text' =>  '<b>' . $listing['products_name'] . '</b>');
$list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF); 

 

To this (but it didn't work):

 

$rows++;

$cur_row = sizeof($list_box_contents);
$list_box_contents[$cur_row] = array('align' => 'left',
                                       'params' => 'colspan="'.sizeof($column_list).'"',
                                       'text' =>  '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . ' ' .  $category['categories_keyword'] .  '</a>';
$list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF); 

 

 

Any ideas?

Posted

Right, the product title is now in the right position but it not linked and isn't formatted (text style etc):

http://www.cfbsuppli...th=2789_21_4053

 

I have tried changing this:

 

 

$rows++;

$cur_row = sizeof($list_box_contents);
$list_box_contents[$cur_row] = array('align' => 'left',
                                       'params' => 'colspan="'.sizeof($column_list).'"',
                                       'text' =>  '<b>' . $listing['products_name'] . '</b>');
$list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF); 

 

To this (but it didn't work):

 

$rows++;

$cur_row = sizeof($list_box_contents);
$list_box_contents[$cur_row] = array('align' => 'left',
                                       'params' => 'colspan="'.sizeof($column_list).'"',
                                       'text' =>  '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . ' ' .  $category['categories_keyword'] .  '</a>';
$list_box_contents[$cur_row+1] = list_box_data($listing, $column_list,$PHP_SELF); 

 

 

Any ideas?

 

You made a slight error,

 

try this:

 

 

$list_box_contents[$cur_row] = array('align' => 'left',
                                       'params' => 'colspan="'.sizeof($column_list).'" class="productListing-title"',
                                       'text' =>  '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . ' ' .  $category['categories_keyword'] .  '</a>');

 

then add this to your css to style:

 

.productListing-title {
font-family: Verdana, Arial, sans-serif;
font-size: 16px;
color: #333;
padding-left:18px;
padding-bottom:10px;
}

 

 

PS You may prefer it with this change too:

 

line 237:

 

'params' => 'class="productListing-data" width="'.($column_list).'%" ',

 

change to:

 

'params' => 'class="productListing-data" valign="top"',

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

That worked a treat thank you Sam.

 

Could I pick your brains about another thing I've been wanting to do?

 

I don't know if its possible or it the best way to go about it but bear with me I will try and explain. Basically you can see I have a free shipping icon on items that have free shipping (contribution: Free shipping per product 1.0 http://addons.oscommerce.com/info/2517), So the code in product_listing is:

 

if ($listing['products_free_shipping'] == true) { 
$lc_text = '<Table><span class="productPriceEX">' . FREE_SHIPPING_FOR_THIS_PRODUCT . etc........

 

I want to move the free shipping to underneath the product description on product_listing but the problem is the code for the product description is also an IF statement and moving the code from where it is now doesn't work. But this isn’t the other thing....

I'm planning on adding a feature to the site based on the free shipping per product 1.0 contrib where I can assign products as "high capacity" and "multipack" just like I can for free shipping and display a icon for each if “true”. I was wondering if you could give me some pointers that I could experiment with in terms of code from product_listing for displaying this. For example the equivalent of:

. FREE_SHIPPING_FOR_THIS_PRODUCT .

for a high capcity product would be:

. HIGH_CAPACITY_PRODUCT .

and for a multipack would be:

. MULTI_PACK_PRODUCT .

 

I have no idea if this is possible or if you have a clue what I'm talking about as it’s difficult to explain, but there would be lots of conditions i.e. a product could have only free shipping and not a multipack or high capacity, another could be all three etc etc…. Basically this is what I would like it to look like:

 

screen3.jpg

 

Any pointers welcome.

Posted

I note you have:

<Table><span class="productPriceEX">' . FREE_SHIPPING_FOR_THIS_PRODUCT . etc........

 

the table tag should be all lower case

 

the section is missing <tr> tags

 

You could simply place that line at the bottom of the section, just b4 the break, by using

 

if ($listing['products_free_shipping'] == true) { 
$lc_text .= '<Table><span class="productPriceEX">' . FREE_SHIPPING_FOR_THIS_PRODUCT . etc........

 

note the .= it means append to the end of the existing, so use that for your others too.

 

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

Hey Sam, that "$lc_text .=" thing works great, I haven’t created the new "multipack" and "High capacity" modules yet I'm experimenting by duplicating the free shipping module, but I having trouble getting the icons on product listing to appear on the same line.

 

This is what I have an the moment:

screen4.jpg

 

An this is what I want it to look like:

screen5.jpg

 

Here the section of code in product_listing:

 

if ($listing['products_free_shipping'] == true) { 
$lc_text .=  '<span class="productPriceEX">' . FREE_SHIPPING_FOR_THIS_PRODUCT . '</span>';            

} else {

          }

if ($listing['products_free_shipping'] == true) { 
$lc_text .=  '<span class="productPriceEX">' . FREE_SHIPPING_FOR_THIS_PRODUCT . '</span>';            

} else {

          }

if ($listing['products_free_shipping'] == true) { 
$lc_text .=  '<span class="productPriceEX">' . FREE_SHIPPING_FOR_THIS_PRODUCT . '</span>';            

} else {

          }

break;

Posted

what add=ons of sams have you installed and i was wondering if you code copy your finished code so i can use it for my site because at the moment it doesnt look very good so could i have your permission to use it?

thanks in advance

Posted

what add=ons of sams have you installed and i was wondering if you code copy your finished code so i can use it for my site because at the moment it doesnt look very good so could i have your permission to use it?

thanks in advance

 

Copying and pasting wouldn't work as I have loads of other contributions installed. But if you install:

 

Product Listing Enhancements, Thumbnails & Manufacturer Headings http://addons.oscommerce.com/info/6051 &

 

Easy Graphical Borders v1.1 http://addons.oscommerce.com/info/1702

 

You'll get the same general layout. They're really easy to install (even I can do it!).

Posted

You are placing each image within a paragraph, closing any paragraph adds a line break, if you did that for formatting, try div instead.

 

 

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Archived

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

×
×
  • Create New...