Active Forum Topics

Search filters

I am looking for a way to setup the site that if there are fields there in the search results when they are valid/there then would appear on the left sidebar to help the user find what they are looking for fast.

Like:

Price
Merchant
Brand
Color
Size
etc..

How hard would this be?

Something like:

{link saved}

of course it would change to show what the information is relevant to based on the category/keyword if the field information is there for the products then it would display.

So this would be an option on the search results and category as when it is totally resolved to its category link in the above example it displays the filters.

That's exactly what the sidebar filters mod available on the download extras page will do. I know you've been a user for a long time so if you want to add filters to an existing site running an earlier distribution email me your search.php and html/searchresults.php and I'll merge the changes in for you...

Thanks David! Figured it would be easiest to post messages directly here :)

Yes it is this one, I tried putting the sidebar together with this linked grid/list after I implemented it, I made the grid/list part into .medium-10, although it seemed like the layout got a bit mixed up.

(I have included a fix in the above - and in the SidebarFiltersFoundation.zip download - so that the filters are not displayed when html/searchresults.php is included on the product page for Related Products...)

All sorted - there was a misplacement of the opening <form ...> tag in html/searchfilters_sidebar.php which I have corrected in the version in the download so if you first replace that file in your installation with the updated version; and also corrected is to change the sense of the check to a test not equal to "products.php" as when viewing all products in a category it is actually categories.php that is the value of $_SERVER["PHP_SELF"].

I am wondering if something like this can still be setup with the new version of PT? At the moment I am experimenting with multiple sub directories, but I am wondering if I only install one main version if this could be done.

Basically, could specific search filters appear for one installation of PT, depending on the category searched i.e. someone is searching for mobile phones, then in the search results, specific mobile phone search filters would appear? If someone would search for photo cameras, then, photo camera search filters would appear in the search results.

I know this is easier to implement in a multi sub directory installation, as you can create search filters for each specific category installation.

I am just purely wondering if this can be done dynamically, to pull the relevant search filter depending on the category of the item searched if only one installation of PT is present?

I am wondering if the described custom search filters could be implemented into a wordpress installation as well? I am not looking for this to be implemented in the sidebar of wordpress, as I have chosen to create a grid layout for the results, an example: {link saved}

Just wondering if it is possible to have the custom search filter in the top of the wordpress results page and pull the dynamic filters like for the standalone version i.e.

First of all it's no problem to show search filters above the results instead of as a widget - to do this, edit the plugin file pto_search.php and look for the following code at line 548:

$html = "";

...and REPLACE with:

$html = "";
$html .= pto_search_filters_html();

The widget HTML is derived from the Main / Search Filters Widget template (wp-admin > Settings > PriceTapestry.org) so it would be no problem to use the same method as the above to load an alternative template from a .txt file in the html/ folder of the associated Price Tapestry installation called, for example:

And then to call in the alternative template (if exists) or use the default template (from /wp-admin/ > Settings > PriceTapestry.org) edit pto_search.php and look for the following code at (now) line 906: