Hi guys,

I'm trying to create price filter for taxonomy teasers based on URL.

Example:
/products/standard-cabins.html?price_min=600&price_max=1900

I need a solution like adding/modifying a file in my custom template folder, e.g. for template.php

May be some query request in hook_preprocess_page() function ???

Thanks in advanced
Dmitry

Comments

nevets’s picture

Are you using views to produce the page?

spirin88’s picture

Yep, i have page specific view.

For each product i have created separate page with the various data and one of the custom fields are price field.

This is store in DB as separate table too (field_data_field_product_price).

All my products are connected/mapped with the taxonomy terms and thats works well too, I can see the list of products related to categories or sub categories.

In my custom view (product details page) i have if condition (if teasers) for customising list of products on taxonomy view page, that is solved as well, but how to filter products by price, here im stuck.

Looks like this filtering logic must be done before calculation of taxonomy products collection to have result filtered before the pagination will be applied.

;)

Regards

spirin88’s picture

Anyone, any idea?

WorldFallz’s picture

I'm not sure I understand the problem. If you're using views and price is a field (which, based on the field name, it seems to be, why not just add it as filter to the view?