You are here:  » Search results - lost the product count

Support Forum



Search results - lost the product count

Submitted by teezone on Tue, 2008-03-25 07:41 in

Hi, I recently moved a PT site, and in the process, seem to have lost the search results display (eg. "showing 1 to 12 of 3732"). Interestingly, I can see the snippet of code in search.php as follows:

$resultCount = $rows[0]["resultcount"];
$banner["h2"] = translate("Search results for")." ".htmlentities($q,ENT_QUOTES,$config_charset)." ";
if ($resultCount)
{
$resultFrom = ($offset+1);
$resultTo = ($offset+$config_resultsPerPage);
if ($resultTo > $resultCount) $resultTo = $resultCount;
$banner["h2"] .= "(".translate("showing")." ".$resultFrom." ".translate("to")." ".$resultTo." ".translate("of")." ".$resultCount.")";

Now I also copied some more recent files from another PT installation, so I believe something is out of synch - is there another place I should be looking for this code (ie. where it is generated).. the "sort by" is appearing correctly.

Thanks!
T.

Submitted by support on Tue, 2008-03-25 08:01

Hi teezone,

The file to check is html/banner.php.

As you can see in the above code, search.php sets $banner["h2"], which should be displayed by html/banner.php if it is set. If you don't see the code, simply extract the latest version from the distribution and merge the code to print the H2 banner into your existing version (it's obviously displaying the H3 banner correctly).

However, if the code does look OK; then it may be a style issue, so it would be worth checking default.css for the .banner h2 class incase anything has happened there that may prevent the code from being displayed...

Cheers,
David.