且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Magento - 分层导航、可配置产品、多个过滤器活动问题

更新时间:2021-12-08 10:11:59

所有用于分层导航的 EAV 下拉属性值都存储在 catalog_product_index_eav 表中,该表一次只知道一个产品时间.可配置产品的每个属性可能有多个值,具体取决于它们的子项,但是这些值的原始属性丢失了,这导致了您得到的情况.

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.

为了让它像你想要的那样工作,你必须重新设计可配置产品和分层导航的 EAV 值的索引方式(Mage_CatalogIndex_Model_Indexer_Eav),以及它们被检索和用于过滤的方式(Mage_Catalog_Model_Layer_Filter_Attribute)

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)