Let's take the demo store as an example. The "All products" link in the main menu returns a page where we can do searches base on facets. So we create an Index type server and there we add what fields we need to use in our facets.

The thing i was asked to do is to have these facets search in the taxonomy term pages. Is there a way to do this thing?

Perhaps with a contextual filter in the view that reads the term id or something like that. Can you please give me a direction to achieve this?

Here is a store that use what i need to do. It's not drupal commerce store but you'll get the idea

http://www.sunglasshut.com/us/women?pageType=women

Thank you in advance

Comments

jsacksick’s picture

Status: Active » Fixed

We decided to remove the taxonomy/term/% view and we replaced it by a view based on the product display index so you shouldn't have this issue anymore, the only thing you'll have to do is to update the visibily of each facets blocks, right now they're only displayed on the all products view.

dianikol’s picture

I do need to have different pages per taxonomy term because i need to have menu items for each brand for example.

They way i did this is by adding a taxonomy term contextual filter in order to show products that belong to the term from the url.
Then i set the path like this "products/%".

So if i have a term called: Hats
i have this url: products/hats.

The trick is in the taxonomy term contextual filter i use php to take the "hats" term id and return it to $handler->argument. Then the view shows the Hats products. Plus the facets show options only available for products that belong to the Hats term.

And i can do this for every different vocabulary, I just need to clone the view and alter the path.
"products/%"
"color/%"
"brands/%" etc.

How does this solution sound??

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pyxio’s picture

Hi jsackick,

I have the same issue. Can you please explain how to change the visibility of facet blocks? I tried the normal way in drupal via path and that does not work? Many thanks.