You are here:  » How to change default selection to "High to Low"


How to change default selection to "High to Low"

Submitted by urmyworld on Tue, 2009-12-08 18:17 in

Hello David,

My next request for info, is:

How can the default search on merchants equate to "High to Low" in the results?

I ask this because, in my website, if people click on a merchant's link, they will be presented with the cheapest products from that merchant.

Which again in my case, reveals the cheapest "Accessories" which is not good for revenue building, or for visitor interaction.

Submitted by support on Wed, 2009-12-09 06:13

Hi David,

To do this, in search.php look for the following code within the main SWITCH statement starting at line 58:

      case "merchant":
        // pass through to category
      case "category":
        // pass through to brand
      case "brand":

...and then on the next line (below case "brand":) add the following code:

        if (!isset($_GET["sort"]) && ($parts[0]=="merchant"))
        {
          $sort = "priceDesc";
        }

Cheers,
David.