Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Split page result


EvgeniyBizuk

Recommended Posts

Posted

Hi. I have osCommerce v2.3.1

When i try add a feature to choose how many products will be display in split_page_result.php

/* Customer Selected listing size */
// if your MAX_DISPLAY_SEARCH_RESULTS = 10
// Drop down menu will be :
// 10
// 20
// 30
// 40
// 50
 $ppp_list = array();
 for ($i = 1; $i <= 5; $i += 1) {
   $ppp = intval($i * MAX_DISPLAY_SEARCH_RESULTS);
   $ppp_list[] = array('id' => $ppp, 'text' => $ppp);
 }
// Show Drop down menu in split_page_link :
// (You can move this part where ever you inside $display_links_string ) here it's a the very begining.
 $display_links_string .= TEXT_PPP . tep_draw_form('prod_per_page', tep_href_link(basename($PHP_SELF), $parameters), 'get'). tep_draw_pull_down_menu('ppp', $ppp_list, $products_per_search_page, 'class="smallText" onchange="this.form.submit()"') ;
 $ignore = array('page', 'ppp');
 if (is_array($HTTP_GET_VARS) && (sizeof($HTTP_GET_VARS) > 0)) {
   reset($HTTP_GET_VARS);
   while (list($key, $value) = each($HTTP_GET_VARS)) {
     if ( (strlen($value) > 0) && ($key != tep_session_name()) && (!in_array($key, $ignore)) ) {
       $display_links_string .= tep_draw_hidden_field($key, $value);
     }
   }
 }
       $display_links_string .= tep_hide_session_id() . '</form>';

It doesn't work because it redirect to "somesite/index.php&ppp=16" but must redirect like "somesite/index.php?cPath=31&ppp=34" What can be the problem. Sorry for my badly english.

Archived

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

×
×
  • Create New...