Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

no function from MAX_DISPLAY_SEARCH_RESULTS


paulchen2005

Recommended Posts

Hi,

 

this code is from includes/modules/allproducts.php

 

 

the error is that the display of the products after MAX_DISPLAY_SEARCH_RESULTS results do not stop...

 

what must i change to stop the display after MAX_DISPLAY_SEARCH_RESULTS

 

 

<?php
/*
 $Id: product_listing.php,v 1.2 2003/02/09 22:19:36 wilt Exp $

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

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/


?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php


 $colspan = sizeof($column_list);

 $listing_numrows_sql = $listing_sql;
 //$listing_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $listing_sql, $listing_numrows);
if (isset($pw_mispell)){ //added for search enhancements mod
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr><td><?php echo $pw_string; ?></td></tr>
</table>
<?php
} //end added search enhancements mod
 $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');
// $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');
// fix counted products

 $listing_numrows = tep_db_query($listing_numrows_sql);
 $listing_numrows = tep_db_num_rows($listing_numrows);

 if ($listing_numrows > 0 && (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3')) {
?>
 <tr>
<td colspan="<?php echo $colspan; ?>"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
	<td class="smallText"> <?php echo $listing_split->display_count($listing_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?> </td>
	<td align="right" class="smallText"> <?php echo TEXT_RESULT_PAGE; ?> <?php echo $listing_split->display_links($listing_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?> </td>
  </tr>
</table></td>
 </tr>
 <tr>
<td colspan="<?php echo $colspan; ?>"><?php echo tep_draw_separator(); ?></td>
 </tr>
<?php
 }
?>
 <tr>
<td>
<?php
 $list_box_contents = array();
 $list_box_contents[] = array('params' => 'class="productListing-heading"');
 $cur_row = sizeof($list_box_contents) - 1;

 $has_description = false;

 if ($listing_numrows > 0) {
$number_of_products = '0';
$listing = tep_db_query($listing_sql);
while ($listing_values = tep_db_fetch_array($listing)) {
  $number_of_products++;

  if ( ($number_of_products/2) == floor($number_of_products/2) ) {
	$list_box_contents[] = array('params' => 'class="productListing-even"');
  } else {
	$list_box_contents[] = array('params' => 'class="productListing-odd"');
  }

  $cur_row = sizeof($list_box_contents) - 1;

  for ($col=0; $col<sizeof($column_list); $col++) {
	$lc_align = '';

	switch ($column_list[$col]) {
	  case 'PRODUCT_LIST_MODEL':
		$lc_text_model = ' ' . $listing_values['products_model'] . ' ';
		break;
	  case 'PRODUCT_LIST_NAME':
		if ($HTTP_GET_VARS['manufacturers_id']) {
		  $lc_text_name = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing_values['products_id'], 'NONSSL') . '"target="_top">' . $listing_values['products_name'] . '</a>';
		} else {
		  $lc_text_name = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing_values['products_id']) . '"target="_top">' . $listing_values['products_name'] . '</a> ';
		}
		 if (PRODUCT_LIST_DESCRIPTION && $listing_values['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH)
		$lc_text_kurz = '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc">' . tep_flatten_product_description($listing_values['products_description'],  '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing_values['products_id']) . '"target="_top">' . TEXT_MORE . '</a>') . '</td></tr></table>'; // Changer $listing par $listing_value pour la creload5
		break;
	  case 'PRODUCT_LIST_MANUFACTURER':
		$lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing_values['manufacturers_id'], 'NONSSL') . '">' . $listing_values['manufacturers_name'] . '</a> ';
		break;
	  case 'PRODUCT_LIST_PRICE':
		$lc_align = 'right';
		if ($listing_values['specials_new_products_price']) {
		  $lc_text_preis = ' <s>' .  $currencies->display_price2($listing_values['products_price'], tep_get_tax_rate($listing_values['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing_values['specials_new_products_price'], tep_get_tax_rate($listing_values['products_tax_class_id'])) . '</span> ';
		} else {
		  $lc_text_preis = ' ' . $currencies->display_price($listing_values['products_price'], tep_get_tax_rate($listing_values['products_tax_class_id'])) . ' ';
		}
		break;
	  case 'PRODUCT_LIST_QUANTITY':
		$lc_align = 'right';
		$lc_text = ' ' . $listing_values['products_quantity'] . ' ';
		break;
	  case 'PRODUCT_LIST_WEIGHT':
		$lc_align = 'right';
		$lc_text = ' ' . $listing_values['products_weight'] . ' ';
		break;
	  case 'PRODUCT_LIST_IMAGE':
		$lc_align = 'center';
		if ($HTTP_GET_VARS['manufacturers_id']) {
		  $lc_text_bild = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing_values['products_id'], 'NONSSL') . '"target="_top">' . tep_image(DIR_WS_IMAGES . $listing_values['products_image'], $listing_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
		} else {
		  $lc_text_bild = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing_values['products_id']) . '"target="_top">' . tep_image(DIR_WS_IMAGES . $listing_values['products_image'], $listing_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';
		}
		break;
	  case 'PRODUCT_LIST_BUY_NOW':
		$lc_align = 'center';
		$lc_text_kaufen = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing_values['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
		break;

	}

	$list_box_contents[$cur_row][] = array('align' => $lc_align,
										   'params' => 'class="productListing-data"',
										   'text'  => $lc_text);
	}
   ?>
<!-- Tabelle einf?gen Anfang----------------------------------------- -->
   <table border="1"  width="100%" align="center" cellspacing="0" cellpadding="0" >
	  <tr>
		 <td width="100%" height="20" class="infoBoxHeading" style="background:url(images/infobox/tlacitko.jpg);" ><?php echo $lc_text_name; ?></td>	<!-- class="infoBoxHeading"  -->
	  </tr>
	</table>
<!-- -----------Mittelteilrahmen Beginn----------------- -->


	 <table border="1"  width="100%" align="center" cellspacing="1" cellpadding="1" class="infoCenter" style="BORDER-BOTTOM: #6699cc 1px solid">   <!--class="infoBox"  -->
	   <tr>
		 <td>

<!-- -----------Mittelteilrahmen 2 Beginn-----------------  -->
			   <table>
				  <tr>
					<td>
<!-- Innere Tabellen Anfang ------------------------------  -->


 <script language="javascript"><!--
function Popup() {
 window.open("<?php echo tep_href_link(FILENAME_INFO_SHOPPING_CART); ?>","info_shopping_cart","height=460,width=430,toolbar=no,statusbar=no,scrollbars=yes").focus();
}
//--></script>
 <table border="0" width="100%" cellspacing="0" cellpadding="0">

							 <tr>
							<td rowspan="2">
								<?php echo $lc_text_bild; ?>
							 </td>
							<td align="center" class="productListing-data">
							<?php echo TABLE_HEADING_MODEL; ?>:<br>
						   <?php echo $listing_values['products_model']; ?>
							<p> </p>

							<?php echo ?><br><?php echo '<a href="java script:Popup()">' . $lc_text = '' . picto_qty($listing_values['products_quantity']) . ''; ?></font>						

							<td rowspan="2" align="right" class="main">
							 <b> <?php echo $lc_text_preis; ?> </b> 

								<?php echo $lc_text_kurz; ?>
							 </td>
						  </tr>
						  <tr>

						  </tr>

						  <tr>
							<td width="20%" height="23" > </td>
							<td width="15%"> </td>
							<td width="65%" align="right"><br><?php echo $lc_text_kaufen; ?>
							</td>
						  </tr>
						</table>

<!-- Innere Tabellen Ende ------------------------------  -->
					</td>
				  </tr>
				</table>
	 <!-- -----------Mittelteilrahmen 2 Ende----------------- -->
</td>
 </tr>

</table>
<!-- ---------------Ende Mittelteil------------------------------------------------ -->
<br>
<!-- Tabelle einf?gen Ende----------------------------------------- -->
   <?php

}

 } else {
?>
 <tr class="productListing-odd">
<td colspan="<?php echo $colspan; ?>" class="smallText"> <?php echo ($HTTP_GET_VARS['manufacturers_id'] ? TEXT_NO_PRODUCTS2 : TEXT_NO_PRODUCTS); ?> </td>
 </tr>
<?php
 }
?>
 <tr>
<td colspan="<?php echo $colspan; ?>"><?php echo tep_draw_separator(); ?></td>
 </tr>
<?php
 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><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 </tr>
 <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></td>
 </tr>
<?php
 }
?>
</table>

 

thank you very much

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...