Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento - Layered navigation, configurable products, multiple filters active issue

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).

like image 729
johann s bark Avatar asked May 23 '13 15:05

johann s bark


People also ask

How do I keep all filters visible in Magento 2 layered navigation?

The Catalog Input Type for Store Owner property of each attribute must be set to “Dropdown,” “Multiple Select,” or “Price.” To make the attributes filterable, the Use in Layered Navigation property of each must be set to either “Filterable (with results)” or “Filterable (no results).”

What is layered navigation Magento 2?

Layered Navigation in Magento 2 is a collection of one or more attribute (e.g price range, color, brand etc.,) which acts as a filter that customer can use to narrow the search. Layered navigation usually appears in the left column of Magento 2 category pages and search results pages.


1 Answers

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)

like image 73
blmage Avatar answered Sep 21 '22 23:09

blmage