How would I go about modifying layered navigation to only look at attributes on the parent configurable product, and not the child?
Child and parent products both have the attribute set and it is used in other places. For example, products all have a color, including the parent. The parent's color isn't always the same as the child's, but it is indicative of the default color. When we filter to a specific color we only want to show items where the parent is set to that default color. Configurable products are visible and simple (child) products are hidden. There are some individual simple products which are not children and are visible which must also remain functional.
Best Answer
With the caveat that layered navigation changes are always more complicated than they seem, the product collection for the layered navigation is instantiated in
It also has its default filters added in
And an intriguingly named
getFilterableAttributes
A rewrite of any one of those methods would be a good place to start (adding an
type=configurable
filter, restricting the filterable attributes, etc.)