You are here:  » Missing "List by Relevance/Rating/ by Price" on Mobile Site

Support Forum



Missing "List by Relevance/Rating/ by Price" on Mobile Site

Submitted by bat on Thu, 2012-11-15 15:12 in

Hi David
I made a mobile site {link saved} but for some reason I've not got the List by Relevance, Rating, Price Min to Max, etc on my search results.
Im guessing I've probably accidentally removed it but can't see where it's missing. Which files dictate this code please and what does it look like?

Thank you!

Submitted by support on Thu, 2012-11-15 15:23

Hi Bat,

search.php sets $banner["h3"] variable containing the links which are then displayed by html/banner.php. Check that your search.php has at or around line 356:

  require("html/banner.php");

...and that should be all it is!

Cheers,
David.
--
PriceTapestry.com

Submitted by bat on Thu, 2012-11-15 15:29

That's there, but still not working.

Submitted by bat on Thu, 2012-11-15 15:31

This is in my banner.php btw

<?php if (
         (strpos($_SERVER["PHP_SELF"],"search.php")===FALSE)
         &&
         (strpos($_SERVER["PHP_SELF"],"products.php")===FALSE)
         &&
         (strpos($_SERVER["PHP_SELF"],"reviews.php")===FALSE)
         ): ?>
<div class='banner'>
 <?php if (isset($banner["h2"])) : ?>
   <h2><?php print $banner["h2"]; ?></h2>
 <?php endif; ?>
 <?php if (isset($banner["h3"])) : ?>
   <h3><?php print $banner["h3"]; ?></h3>
 <?php endif; ?>
</div>
<?php endif; ?>

Submitted by support on Thu, 2012-11-15 15:41

Hi bat,

The IF condition (strpos($_SERVER["PHP_SELF"],"search.php")===FALSE) in your html/banner.php would actually be preventing banner.php from being displayed on search.php so that probably wants to be removed for this installation - have a go with:

<?php if (
         (strpos($_SERVER["PHP_SELF"],"products.php")===FALSE)
         &&
         (strpos($_SERVER["PHP_SELF"],"reviews.php")===FALSE)
         ): ?>
<div class='banner'>
 <?php if (isset($banner["h2"])) : ?>
   <h2><?php print $banner["h2"]; ?></h2>
 <?php endif; ?>
 <?php if (isset($banner["h3"])) : ?>
   <h3><?php print $banner["h3"]; ?></h3>
 <?php endif; ?>
</div>
<?php endif; ?>

Cheers,
David.
--
PriceTapestry.com

Submitted by bat on Thu, 2012-11-15 15:43

It's working now. Brill stuff! Thanks very much, David.