Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Drop Down Results per page Not working


maxtors

Recommended Posts

i have this problem i have a drop down to show 5, 15, 25, or 50, results per page it works until i go to page 2 and so on it goes back to 15 results the default per page i also have Ultimate SEO installed i think this is what is breaking this does anyone know where i should look to get this fixed?

 

<?php
 $all = $listing_split->number_of_rows;
 $page_options = array(array('id' => $hold_max_pages, 'text' => sprintf(SHOWING_RESULTS, $hold_max_pages)));
 $page_options[] = array('id' => $all, 'text' => sprintf(SHOW_RESULTS, 'All') . " ($all)");
 $page_options[] = array('id' => 5, 'text' => sprintf(SHOW_RESULTS, 5));
 $page_options[] = array('id' => 15, 'text' => sprintf(SHOW_RESULTS, 15));
 $page_options[] = array('id' => 25, 'text' => sprintf(SHOW_RESULTS, 25));
 $page_options[] = array('id' => 50, 'text' => sprintf(SHOW_RESULTS, 50));
 echo tep_hide_session_id();
 echo tep_draw_pull_down_menu('max_pages', $page_options, '', 'onchange="this.form.submit()"');
?>

Link to comment
Share on other sites

i added "id" to the tep_get_all_get_params(array('refine', 'page', 'id', 'info', 'x', 'y', 'manufacturers_id'))); ?> and still not working :(

 

<form name="filter" action="<?php echo tep_href_link(basename($PHP_SELF),tep_get_all_get_params(array('refine', 'page', 'id', 'info', 'x', 'y', 'manufacturers_id'))); ?>" method="post">

  <input id="refine" type='text' name='refine' value="<?=REFINE_RESULTS?>" style='width:42%;' class="fieldValue" />
<?php echo tep_draw_hidden_field('categories_id', (int)$current_category_id) . tep_draw_hidden_field('search_in_description', '1') . tep_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH, "id='subsearch' name='subsearch' style='margin:0 5px;'"); ?>
  <div style="display:inline-block; width:49%; margin: 0.5em 0; text-align:center;"></div>
<div>
<?php
 // optional Product List Filter
 if (PRODUCT_LIST_FILTER > 0) {
   $filterlist_sql = "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
   $filterlist_query = tep_db_query($filterlist_sql);
   if (tep_db_num_rows($filterlist_query) > 1) {
  echo tep_draw_hidden_field('cPath', $cPath);
  $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
  echo tep_draw_hidden_field('sort', $HTTP_POST_VARS['sort']);
  while ($filterlist = tep_db_fetch_array($filterlist_query)) {
    $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
  }
  echo tep_draw_pull_down_menu('manufacturers_id', $options, (isset($HTTP_POST_VARS['manufacturers_id']) ? $HTTP_POST_VARS['manufacturers_id'] : ''), 'onchange="this.form.submit()"');
   }
 }
?>

<?php
 $all = $listing_split->number_of_rows;
 $page_options = array(array('id' => $hold_max_pages, 'text' => sprintf(SHOWING_RESULTS, $hold_max_pages)));
 $page_options[] = array('id' => 5, 'text' => sprintf(SHOW_RESULTS, 5));
 $page_options[] = array('id' => 15, 'text' => sprintf(SHOW_RESULTS, 15));
 $page_options[] = array('id' => 25, 'text' => sprintf(SHOW_RESULTS, 25));
 $page_options[] = array('id' => 50, 'text' => sprintf(SHOW_RESULTS, 50));
 echo tep_hide_session_id();
 echo tep_draw_pull_down_menu('max_pages', $page_options, '', 'onchange="this.form.submit()"');
?>
  </div>
 </form>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...