Magento - Layered navigation, configurable products, multiple filters active issue
Asked Answered
S

1

15

Say I have a single configurable product in a Magento (1.7) store, "T-Shirt-A" which comes in Red (sizes 1,2) and Black (size 2).

In the layered navigation if I select "Black" and "size 1"

  • I WANT to see no results - because there are no simple products that are available in "Black" AND "size 1".
  • INSTEAD I SEE "T-Shirt-A" because it comes in Black and in Size 1 (but, no associated simple product meets both criteria)

What can I do to achieve the search results I want (have the filters show the configurable products which have at least one associated simple product that meets ALL filtered criteria).

Severity answered 23/5, 2013 at 15:34 Comment(4)
Have you found a solution ? I have the exact same case ...Greenback
The functions given in the following url may give u an exact idea. magento.stackexchange.com/questions/268/…Courson
@johann s bark, did you finally found a solution for your question?Middelburg
I did not implement a solution to the issue (client's budget didn't allow for it). But -- I think the answer below from blmage summarizes it the best -- given the way the layered navigation currently works, it's not possible without reworking how products are indexed. If you do want to do this, see the code dushyant-joshi linked to above to get started.Severity
G
7

All EAV dropdown-attribute values used for layered navigation are stored in the catalog_product_index_eav table, which only knows about one single product at a time. Configurable products may have multiple values for each attribute depending on their children, but then the original belongings of those values are lost, which leads to the case you get.

To make it work like you want, you would have to rework the way EAV values are indexed for configurable products and layered navigation (Mage_CatalogIndex_Model_Indexer_Eav), and the way they are retrieved and used for filtering (Mage_Catalog_Model_Layer_Filter_Attribute)

Giacomo answered 10/6, 2013 at 8:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.