You are here:  » Front-end filters on product-pages


Front-end filters on product-pages

Submitted by wdekreij on Sun, 2010-09-19 13:58 in

Hi,

I was wondering whether someone has already managed to make filters on the product pages. Thus, making it possible to select brand X, Y and C, and only products of these brands are shown. Then, after clicking on category F, only the products of brands X, Y and C in category F are shown.

Who has a suggestion how to start on that?

Submitted by support on Sun, 2010-09-19 15:27

Hi,

I'm not yet implemented filters for the product page - bear in mind that normally you would expect a product to be from a single category; but if that's not the case on your site and can certainly help you implement it. I do have a comprehensive filter mechanism for the search results page if you are looking for drop-down filters there - if you would like to implement that if you could send me your search.php and html/searchresults.php i'll add the code for you...

Cheers,
David.
--
PriceTapestry.com

Submitted by wdekreij on Mon, 2010-09-20 16:58

Hi David,

I already mailed you earlier today, but to prevent that several scripts/cases get mixed up, I'll re-post it here. I thinks this makes it easier for you to keep track :-)

The updated search & searchresults.php do indeed have filters, so that I can select (with a dropdown) which brand or shop (etc) has to be filtered. However, I'm hoping to achieve something a bit more advanced; the option to select multiple brands, multiple categories, etc, and only show the products that match to these conditions. So - for instance - if the brands Sony and Philips are active, as well as dvd-players and stereos, only the dvd-players and stereos of Sony and Philips have to be shown.

Currently only one brand can be selected (using the dropdown).

Any thoughts on this?

Submitted by support on Mon, 2010-09-20 17:01

Hi,

Thanks, I got the mail, I need to re-work the filters to enable multi-select; it's not just the form but the handling code to enable multiple options, i'll work the code out on my test server and get back to you...

Cheers,
David.
--
PriceTapestry.com

Submitted by redspark on Tue, 2010-09-21 08:47

Hi David,

I'm intereseted in the reworked filters as well. I have implemented the "standard" filtering at the moment. for example: http://www.prijschecker.com/category/Home-cinema/ and i have reworked a textbased filtering. for example: http://www.prijstoets.nl/category/Netbook-mini/.

regards,

B.

Submitted by support on Tue, 2010-09-21 10:29

Hi,

I've worked the changes out - if you want to email me your search.php and html/searchresults.php i'll merge the changes in for you...

Cheers,
David.
--
PriceTapestry.com

Submitted by wdekreij on Tue, 2010-09-21 15:08

Thanks! It works :-)

Only when "All" is selected, no results come up.. It appears that if "&categoryFilter[]=" is empty (nothing after the "=") nothing passes the filter.

Submitted by support on Tue, 2010-09-21 15:22

Hi,

I've spotted the problem - is_array() needs to be replaced with count() for each test of $merchantFilter, $categoryFilter and $brandFilter in search.php - i've just emailed you a corrected version...

Cheers,
David.
--
PriceTapestry.com

Submitted by wdekreij on Sat, 2010-10-30 14:41

Is it also possible to use this filter mechanism without (or instead) of the category-system.

Right now I have to navigate to a certain category to be able to use the filters, which are only working on products within that category. I would like to have a page that shows "all" products and all filter-options, without having to navigate to a certain category first.

Would that be possible?

Submitted by support on Sat, 2010-10-30 17:02

Hi,

Sure, you can link to the query "bw:" (without quotes) to return all products!

Cheers,
David.
--
PriceTapestry.com

Submitted by henk on Mon, 2012-01-23 16:21

Hi David

Can you send me one to :)

Thx Henk

Submitted by support on Mon, 2012-01-23 16:38

Hi Henk,

Could you drop me an email and in it confirm which modification you were after - list versions of the sidebar search results filters I can send to you; if for an existing site if you could attach search.php and html/searchresults.php I'll modify your current files...

Cheers,
David.
--
PriceTapestry.com