You are here:  » Filter By Price


Filter By Price

Submitted by dbfcs on Thu, 2012-09-27 10:59 in

Hi David,

I'm looking to add price range filtering to my niche PT installtion. It only has a couple of hundred products so I guess it should be relatively straightforward versus a massive installation.

I've tried searching the forum and can't find anything so wondered if you knew of any existing threads I should check out to implement such a feature.

Thanks!

Submitted by support on Thu, 2012-09-27 11:12

Hi,

There's a price range filter (import time filter, not search results!) in this thread...

Cheers,
David.
--
PriceTapestry.com

Submitted by dbfcs on Thu, 2012-09-27 12:06

Thanks for this David.

It's not quite what I'm looking for though (search results, not import time filter!).

Do you know if anyone has managed to successfully filter by price in search.php?

Submitted by support on Thu, 2012-09-27 12:31

Ah sorry Dave I misread your post...!

There's a tidy version in this thread that should do what you want.

You're probably aware of the comprehensive sidebar filter mods (both drop-down and list views) available on the extra downloads page here. Both versions include simple text boxes for min / max price but the method described on the above thread with text links for different ranges could easily be incorporated into them if you wanted the full filter functionality - maybe not necessary for niche but if you wanted to do that just let me know..!

Cheers,
David.
--
PriceTapestry.com

Submitted by dbfcs on Thu, 2012-09-27 13:16

David,

Wow, that was easy!

Thanks!

Dave

Submitted by dbfcs on Thu, 2012-09-27 13:28

David,

Just had a thought.

Is there a way to use a wildcat search term to bring back everything, subject to a price limit, thus ignoring the "q" value?

e.g. search.php?q=ALL&minPrice=50

I did wonder whether it was possible to amend search.php to accept an operator such as "all:" rather than using a wildcat q value.

e.g. search.php?q=all:&minPrice=50

Not really sure if either are feasible, and whether you'd suggest a favourite in terms of security and performance?

Submitted by support on Thu, 2012-09-27 13:51

Hi Dave,

"out of the box" the query bw: will return all products, so can be filtered by price. It's the "Begins With" operator, but by leaving the second part blank matches all products, e.g.

/search.php?q=bw:&minPrice=100.00&maxPrice=200.00

Cheers,
David.
--
PriceTapestry.com

Submitted by dbfcs on Thu, 2012-09-27 14:18

Thank you very much :-)