Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Better product listing Rating *****


bhbilbao

Recommended Posts

I need this both working.

 

Better product listing and product info

http://addons.oscommerce.com/info/6505

 

 

Review Rating In Product Listing 1.0

http://addons.oscommerce.com/info/6674

 

Better product listing is well installed but when trying to integrate the review system with the points nothing happens.

 

Does anyone how to modify or recomend other rating contribution for modified listings?????

 

 

This is the product_listing.php:

 

 

 

 

 

<?php


	$list_box_contents = array();
	$list_box_contents[] = array('params' => 'class="productListing-heading"');
	$cur_row = sizeof($list_box_contents) - 1;
	$add_multiple = false;
	$use_of_attributes = false;
	$get_short_description = true;
	$column_list[] = PRODUCT_SHORT_DESCRIPTION;
for ($col=0, $n=sizeof($column_list); $col<$n; $col++)
{
	switch ($column_list[$col])
	{
		case 'PRODUCT_LIST_MULTIPLE':
		$add_multiple = true;
		$use_of_attributes = true;
		echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'sort', 'products_id')) . 'action=add_multiple', 'NONSSL') . '">';
		break;
	case '$extra_images':
		$use_of_attributes = true;
		break;
	case 'PRODUCT_SHORT_DESCRIPTION':
	$get_short_description = true;
		break;
	}
}
?>
<?php
	$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');

	if ( ($listing_split->number_of_rows > 0) && ( (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', 'products_id'))); ?></td>
</tr>
</table>
	<?php
}
	$list_box_contents = array();
	global $cart;

	if ($listing_split->number_of_rows > 0)
{
if (PRODUCT_LIST_GRID <= 0)
{
	$colnum = 3;
	$tdsize = floor(100/3);
} else {
	$colnum = PRODUCT_LIST_GRID;
	$tdsize = floor(100/PRODUCT_LIST_GRID);
}
$row = 0;
$column = 0;
$listing_query = tep_db_query($listing_split->sql_query);
   $no_of_listings = tep_db_num_rows($listing_query);
    while ($_listing = tep_db_fetch_array($listing_query))
 {
   $_listing['total'] = '';        
   $listing[] = $_listing;
   $list_of_prdct_ids[] = $_listing['products_id'];
}
	if ($use_of_attributes == true) {
   $products_attributes_count_query = tep_db_query("select count(*) as total, patrib.products_id from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id in (" . implode(',', $list_of_prdct_ids) . ") and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "' group by products_id");
	while ($_products_attributes_count = tep_db_fetch_array($products_attributes_count_query)) {
     $products_attributes_count[] = array('products_id' => $_products_attributes_count['products_id'], 'total' => $_products_attributes_count['total']);
   }
   $no_of_products_with_attributes = count($products_attributes_count);
   for ($x = 0; $x < $no_of_listings; $x++) {
     if (!empty($products_attributes_count)) {
       for ($i = 0; $i < $no_of_products_with_attributes; $i++) {
         if ($listing[$x]['products_id'] == $products_attributes_count[$i]['products_id'] ) {
           $listing[$x]['total'] = $products_attributes_count[$i]['total'];
         }
       }
     }
   }
 }

 $specials_query = tep_db_query("select products_id, specials_new_products_price from " . TABLE_SPECIALS . " where products_id in (" . implode(',', $list_of_prdct_ids) . ") and status = '1'");
 while ($specials_array = tep_db_fetch_array($specials_query)) {
   $new_s_prices[] = array ('products_id' => $specials_array['products_id'], 'products_price' => '', 'specials_new_products_price' => $specials_array['specials_new_products_price']);
 }


 for ($x = 0; $x < $no_of_listings; $x++) {
   if (!empty($new_s_prices)) {
     for ($i = 0; $i < count($new_s_prices); $i++) {
       if ($listing[$x]['products_id'] == $new_s_prices[$i]['products_id'] ) {
         $listing[$x]['specials_new_products_price'] = $new_s_prices[$i]['specials_new_products_price'];
       }
     }
   }
 }


  if ($get_short_description == true) {
  $short_description_query = tep_db_query("select pd.products_id, pd.products_description from " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.language_id = '" . (int)$languages_id . "' and products_id in (" . implode(',', $list_of_prdct_ids) . ")");
  while ($short_description_array = tep_db_fetch_array($short_description_query)) {
    $short_description[] = array ('products_id' => $short_description_array['products_id'], 'short_description' => substr(strip_tags($short_description_array['products_description']), 0, PRODUCT_LIST_NUM) . '...');
  }


 $number_of_descriptions = count($short_description);
   for ($x = 0; $x < $no_of_listings; $x++) {
     if ($number_of_descriptions > 0) {
       for ($i = 0; $i < $number_of_descriptions; $i++) {
         if ($listing[$x]['products_id'] == $short_description[$i]['products_id'] ) {
           $listing[$x]['short_description'] = $short_description[$i]['short_description'];
         }
       }
     }
   }
 }

 $counter = 0;
 for ($x = 0; $x < $no_of_listings; $x++) {

  if ($x % PRODUCT_LIST_GRID == 0) {
    if (($counter+1)/2 == floor(($counter+1)/2)) {

      $list_box_contents[$row] = array('params' => 'class="productListing-even"');
      $class_for_buy_now_row = 'class="productListing-even"';
    } else {
      $list_box_contents[$row] = array('params' => 'class="productListing-even"');
      $class_for_buy_now_row = 'class="productListing-odd"';
    }
  }

	$product_contents = array();

	for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
		$lc_align = '';
		$lc_text = array();

		switch ($column_list[$col]) {
			case 'PRODUCT_LIST_MODEL':
			$lc_align = '';
			$lc_text['products_model'] = ' ' . $listing[$x]['products_model'] . ' ';
			break;
			case 'PRODUCT_LIST_NAME':
			$lc_align = '';
			if (isset($_GET['manufacturers_id'])) {
				$lc_text['products_name'] = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . (int)$_GET['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a>';
			} else {
				$lc_text['products_name'] = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a>';
			}
			break;
			case 'PRODUCT_SHORT_DESCRIPTION';
			  $lc_text['products_short_description'] = $listing[$x]['short_description'];
			  break;
			case 'PRODUCT_LIST_MANUFACTURER':
			$lc_align = '';
			$lc_text['manufacturers_name'] = '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing[$x]['manufacturers_id']) . '">' . $listing[$x]['manufacturers_name'] . '</a>';
			break;
			case 'PRODUCT_LIST_PRICE':
			$lc_align = 'right';
			if (tep_not_null($listing[$x]['specials_new_products_price'])) {
				$lc_text['products_price'] = '<s>' .  $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing[$x]['specials_new_products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</span>';
			} else {
				$lc_text['products_price'] = ' ' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . ' ';
			}
			break;
			case 'PRODUCT_LIST_QUANTITY':
			$lc_align = 'right';
			$lc_text['products_quantity'] = ' ' . $listing[$x]['products_quantity'] . ' ';
			break;
			case 'PRODUCT_LIST_WEIGHT':
			$lc_align = 'right';
			$lc_text['products_weight'] = ' ' . $listing[$x]['products_weight'] . ' ';
			break;
			case 'PRODUCT_LIST_IMAGE':
			$lc_align = 'center';
			if (isset($_GET['manufacturers_id'])) {
				$lc_text['products_image'] = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . (int)$_GET['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH+40, SMALL_IMAGE_HEIGHT +40) . '</a>';
			} else {
				$lc_text['products_image'] = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH+40, SMALL_IMAGE_HEIGHT +40) . '</a>';
			}
			break;

			case 'PRODUCT_LIST_BUY_NOW':
      $lc_text['button_in_cart'] = '<a href="' . tep_href_link(basename($_SERVER['PHP_SELF']), tep_get_all_get_params(array('action','sort','products_id')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW, 'style="padding-bottom: 5px;"') . '</a>';

      $lc_text['button_continue'] = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('small_view.gif', IMAGE_BUTTON_CONTINUE, 'style="padding-bottom: 5px;"') . '</a>';
			break;

			case 'PRODUCT_LIST_MULTIPLE':
			$lc_align = 'right';
			$lc_valign = 'top';
			$product_list_multiple_text = (TABLE_HEADING_MULTIPLE . tep_draw_input_field('Qty_ProdId_' . $listing[$x]['products_id'], '0', 'size="4"'));
       if ((int)$listing[$x]['total'] > 0) {
				$product_list_multiple_text .= '<table border="0" cellpadding="0" cellspacing"0">';
				$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing[$x]['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'");
				while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
					$selected_attribute = false;
					$products_options_array = array();
					$product_list_multiple_text .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td>' . "\n";
					$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $listing[$x]['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'");
	$list_of_prdcts_attributes_id = '';
 		$products_options = array();
       while ($_products_options = tep_db_fetch_array($products_options_query)) {
	      $products_options[] = $_products_options;
      }

  for ($v = 0 ; $v < count($products_options); $v++) {
         $options_text = '';
         $options_text = $products_options[$v]['products_options_values_name'];
         if (defined('PRODUCT_LIST_ACTUAL_PRICE_IN_DROPDOWN') && PRODUCT_LIST_ACTUAL_PRICE_IN_DROPDOWN == 'Yes') {

             if (tep_not_null($listing[$x]['specials_new_products_price'])) {
               $original_price = $listing[$x]['specials_new_products_price'];
             } else {
               $original_price = $listing[$x]['products_price'];
             }
             if ($products_options[$v]['price_prefix'] == "-")
             {
	            $show_price = 0.0 + $original_price - $products_options[$v]['options_values_price'];
            } else {
       	      $show_price = 0.0 + $original_price + $products_options[$v]['options_values_price'];
            }
             $options_text .= ' (' .  $currencies->display_price($show_price, tep_get_tax_rate($listing[$x]['products_tax_class_id'])) .') ';

         } else {
           if ($products_options[$v]['options_values_price'] != '0') {
             $options_text .= ' (' . $products_options[$v]['price_prefix'] . $currencies->display_price($products_options[$v]['options_values_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) .') ';
           }
         }
         $products_options_array[] = array('id' => $products_options[$v]['products_options_values_id'], 'text' => $options_text);
       }

					$product_list_multiple_text .= tep_draw_pull_down_menu('id_'.$listing[$x]['products_id'].'[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute);
					$product_list_multiple_text .= '</td></tr>';
				}
				$product_list_multiple_text .= '</table>';
				$lc_text['product_list_multiple'] = $product_list_multiple_text;
			}
			break;
			case '$extra_images':
			$lc_align = 'right';
			$lc_valign = 'top';
			$lc_text_plbnm = '<form name="buy_now_' . $listing[$x]['products_id'] . '" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action','sort','products_id')) . 'action=buy_now_form', 'NONSSL') . '">';
			$lc_text_plbnm .= (TABLE_HEADING_MULTIPLE) . '<input type="text" name="cart_quantity" value="1" maxlength="6" size="4">';
       if ((int)$listing[$x]['total'] > 0) {
				$lc_text_plbnm .= '<table border="0" cellpadding="0" cellspacing"0">';
				$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing[$x]['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'");
				while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
					$selected_attribute = false;
					$products_options_array = array();
					$lc_text_plbnm .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td>' . "\n";
					$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $listing[$x]['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'");
	$list_of_prdcts_attributes_id = '';
 		$products_options = array();
       while ($_products_options = tep_db_fetch_array($products_options_query)) {
	      $products_options[] = $_products_options;
      }

  for ($v = 0 ; $v < count($products_options); $v++) {
         $options_text = '';
         $options_text = $products_options[$v]['products_options_values_name'];
         if (defined('PRODUCT_LIST_ACTUAL_PRICE_IN_DROPDOWN') && PRODUCT_LIST_ACTUAL_PRICE_IN_DROPDOWN == 'Yes') {
             if (tep_not_null($listing[$x]['specials_new_products_price'])) {
               $original_price = $listing[$x]['specials_new_products_price'];
             } else {
               $original_price = $listing[$x]['products_price'];
             }
             if ($products_options[$v]['price_prefix'] == "-")
             {
	            $show_price = 0.0 + $original_price - $products_options[$v]['options_values_price'];
            } else {
       	      $show_price = 0.0 + $original_price + $products_options[$v]['options_values_price'];
            }
             $options_text .= ' (' .  $currencies->display_price($show_price, tep_get_tax_rate($listing[$x]['products_tax_class_id'])) .') ';
         } else {
           if ($products_options[$v]['options_values_price'] != '0') {
             $options_text .= ' (' . $products_options[$v]['price_prefix'] . $currencies->display_price($products_options[$v]['options_values_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) .') ';
           }
         }
         $products_options_array[] = array('id' => $products_options[$v]['products_options_values_id'], 'text' => $options_text);
       }

					$lc_text_plbnm .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute);
					$lc_text_plbnm .= '</td></tr>';
				}
				$lc_text_plbnm .= '</table>';
				$lc_text_plbnm .= tep_draw_hidden_field('products_id', $listing[$x]['products_id']) . tep_image_submit('button_buy_now.gif', TEXT_BUY . $listing[$x]['products_name'] . TEXT_NOW);

			}
			if ((int)$listing[$x]['total'] == 0) {
				$lc_text_plbnm .= '<br> ';
				$lc_text_plbnm .= tep_draw_hidden_field('products_id', $listing[$x]['products_id']) . tep_image_submit('button_buy_now.gif', TEXT_BUY . $listing[$x]['products_name'] . TEXT_NOW);
				$lc_text_plbnm .= '<br> ';
				$lc_text_plbnm .= '<table border="0" cellpadding="0" cellspacing"0"><tr><td class="main"></td><td></td></tr></table>';
			}
			$lc_text_plbnm .= '</form>';
			$lc_text['$extra_images'] = $lc_text_plbnm;
			break;

			default: $lc_text = array();
		}
		if (is_array($lc_text)) {
		  foreach($lc_text as $name => $contents) {
		  $product_contents[$name] = $contents;
		  }
		}
	}


	$class_for_right_side = '';
	if (($x % $colnum) < ($colnum - 1)) {
	  $class_for_right_side = ' class="infobox"';
	}
	$class_for_bottom = '';
	$last_row = ceil($no_of_listings / $colnum) - 1;
	if ($row < $last_row) {
	  $class_for_bottom = ' class="infobox"';
	}
       if(PRODUCT_LIST_GRID ==1)  {
	$product_text = "\n";
	$product_text .= '<table Width="100%" cellpadding="0" cellspacing="0" border="0">';
	$product_text .= ' <tr><td width="25%" rowspan="7"   align="center">' . $product_contents['products_image'] . '</td>';
	$product_text .= ' <td width="70%"  class="pagelisting">' . $product_contents['products_name'] . '</td></tr>';
	$product_text .= ' <tr><td width="70%" cellpadding="0" cellspacing="0" class="description"><br>' . $product_contents['products_short_description'] . '<br></td></tr>';
	$product_text .= ' <tr><td width="70%" class="price">'. LISTING_PRICE . $product_contents['products_price'] . '</td></tr>';
	 if (!PRODUCT_LIST_MANUFACTURER == 1) { } else {
	$product_text .= ' <tr><td width="70%" class="main">'. LISTING_MANUFACTURER . $product_contents['manufacturers_name'] . '</td></tr>';
	}
	if (!PRODUCT_LIST_QUANTITY == 1) { } else {
              $product_text .= ' <tr><td width="70%" class="main">'. LISTING_QTY . $product_contents['products_quantity'] . '</td></tr>';
               }
	$product_text .= ' <tr><td  height="25" align="left">' . $product_contents['button_in_cart'] . ' ' . $product_contents['button_continue'] .'</td></tr>';
	$product_text .= '</tr></table><hr>';
	$list_box_contents[$row][$column] = array('align' => 'center',
											'valign' => $lc_valign,
											'params' => 'class="productListing-data" width="'.$tdsize.'%"',
											'text'  => $product_text);
	$column ++;
	if ($x == ($no_of_listings -1)) {
		$last_column = ($x % PRODUCT_LIST_GRID);
		$fill_up_empty_cell = tep_draw_separator('pixel_trans.gif', '250px' , '1');
		for ($column = ($last_column + 1) ; $column < $colnum; $column++) {
			$list_box_contents[$row][$column] = array('align' => 'center',
											'valign' => $lc_valign,
											'params' => 'class="productListing-data" width="'.$tdsize.'%"',
											'text'  => $fill_up_empty_cell);
		}
	}
       }


       elseif (PRODUCT_LIST_GRID ==2){
       $product_text = "\n";
	$product_text .= '<table Width="98%" height="300" cellpadding="0" cellspacing="0" style="border-width:1px; border-color:black; border-style:solid;">';
       $product_text .= ' <tr><td  colspan="2" class="pagelist">' . $product_contents['products_name'] . '</td></tr>';
	$product_text .= ' <tr><td  colspan="2"   align="center">' . $product_contents['products_image'] . '</td></tr>';
	$product_text .= ' <tr><td align="center" colspan="2">' . $product_contents['button_in_cart'] . ' ' . $product_contents['button_continue'] .'</td></tr>';
	$product_text .= ' <tr><td  colspan="2" class="price">'.LISTING_PRICE . $product_contents['products_price'] . '</td></tr>';
	 if (!PRODUCT_LIST_MANUFACTURER == 1) { } else {
	$product_text .= ' <tr><td  colspan="2" class="main">'. LISTING_MANUFACTURER . $product_contents['manufacturers_name'] . '</td></tr>';
	}
	if (!PRODUCT_LIST_QUANTITY == 1) { } else {
              $product_text .= ' <tr><td colspan="2" class="main">'. LISTING_QTY . $product_contents['products_quantity'] . '</td></tr>';
               }
  		$product_text .= ' <tr><td colspan="2" class="description">'. LISTING_DESCRIPTION . '<BR>' . $product_contents['products_short_description'] .  '<br></td></tr>';
	$product_text .= '</table>';
       $product_text .= '<table><tr><td></td></tr></table>';
	$list_box_contents[$row][$column] = array('align' => 'center',
											'valign' => $lc_valign,
											'params' => 'class="productListing-data" width="'.$tdsize.'%"',
											'text'  => $product_text);
	$column ++;
	if ($x == ($no_of_listings -1)) {
		$last_column = ($x % PRODUCT_LIST_GRID);
	   	$fill_up_empty_cell = tep_draw_separator('pixel_trans.gif', '220px' , '1');
		for ($column = ($last_column + 1) ; $column < $colnum; $column++) {
			$list_box_contents[$row][$column] = array('align' => 'center',
											'valign' => $lc_valign,
											'params' => 'class="productListing-data" width="'.$tdsize.'%"',
											'text'  => $fill_up_empty_cell);
		}
	}
       }
	if ($column >= $colnum && $x < ($no_of_listings -1)) {
		$row ++;
		$column = 0;
     $counter++;
   }
}

new productListingOSCBox($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 > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (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','products_id','sort'))); // sort was added in this file, no point here ?></td>
</tr>
<?php if ($add_multiple == true){
?>
 <tr>
   <td align="left" class="main"> </td>
   <td align="right" class="main"><?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);
   ?></form></td>
 </tr>
<?php } ?>
</table>
<?php
 }
?>

Link to comment
Share on other sites

There are a number of issues you will encounter trying that, but if you look at Product Listing Enhancements, Thumbnails & Manufacturer Headings http://addons.oscommerce.com/info/6051 that already has reviews built in, perhaps you could either use that in place, or examine the code to help you integrate with your existing.

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.

Link to comment
Share on other sites

Thanks Spooks,

 

its not the first time i have problems with "Better product listting".

 

Tried to add the reviews starts and now the buy_now.gif button dissapeared. ¿?

 

I always must to edit again the products_listing.php file when installing a new contribution.

 

Im boring of it.

 

I will try Product Listing Enhancements.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...