Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MAX_DISPLAY_SEARCH_RESULTS


000---000

Recommended Posts

Posted

Hi, how can I set the number of products per page to be greater than 10. I have changed MAX_DISPLAY_SEARCH_RESULTS but this does not seem to make any difference. (It does on other OSC sites I run). Is there a place in index.php or product_listing.php that I can manually overide this variable? Or, I think there may be another file which affects the display count as advanced_product_search.php and a few other pages use the same variables.

 

*I've checked to make sure the admin is changing details in the right data base. Reducing New Products Module to "1" shows only 1 item on the front page etc. Having "Search Results" (MAX_DISPLAY_SEARCH_RESULTS) set to 500 or 1 or anything makes no difference to the number of products shown within the each category. It is always 10.

 

** I think it's either to do with the following (from product_listing.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') ) ) {

 

 

OR just below the above, still in product_listing.php:

 

$list_box_contents = array();

 

for ($col=0, $n=sizeof($column_list); $col<$n; $col++)

 

 

Can anyone advise further please.

 

Thanks

oscommerce_community_forums.gif
Posted

Hi

I take it that you have tried the method via admin?

Admin / configuration / maximum values / search results

 

Nic

Yes, and changing those figures does change the configuration table values in the database, but this does not affect the display results.

I've tried changing what you mention in other OSC sites I run and it works for them. Had to do that to make sure I wasn't going mad.

 

Matt

oscommerce_community_forums.gif
Posted

I've tried using the same product_listing.php file on a different OSC site, and that site will show more than 10 products (the correct amount according to Admin / configuration / maximum values / search results or MAX_DISPLAY_SEARCH_RESULTS.

 

There must be another page or function that controls the amount of products displayed. Any ideas or pointers gratefully received. Thanks.

oscommerce_community_forums.gif
Posted

Found the problem/solution...

 

includes/classes/split_page_results.php

 

Line 34 was set to:

 

$this->number_of_rows_per_page = 10;

 

not

 

$this->number_of_rows_per_page = $max_rows;

 

{Something in my previous reply triggered me to search through the functions dir and that led onto classes...}

oscommerce_community_forums.gif

Archived

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

×
×
  • Create New...