You are here:  » Bespoke filters and categories


Bespoke filters and categories

Submitted by crounauer on Fri, 2019-12-06 09:57 in

Hi David,

So as you know I have a site which sells coffee machines etc and uses bespoke product filters.

At the moment I have a category for Bean to Cup Machines along with a comprehensive set of bespoke filters unique to Bean to Cup Machines.

I am now looking to add Espresso Machines as a second category. This category will have its own unique set of product filters.

My question is: Is it possible to do this within 1 installation of PT or do I need to do a second install?

Thanks,
Simon

Submitted by support on Mon, 2019-12-09 11:14

Hi Simon,

It would be no problem to call in different versions of html/searchfilters.php based on category - to try this, edit search.php and look for the following code at line 551:

  require("html/searchfilters.php");

...and REPLACE with, for example;

  switch($categoryFilter)
  {
    case "Category 1:
      require("html/searchfilters_category1.php");
      break;
    case "Category 2:
      require("html/searchfilters_category2.php");
      break;
    // etc.
    default:
      require("html/searchfilters.php");
      break;
  }

Cheers,
David.
--
PriceTapestry.com