且构网

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

Magento-分层导航,可配置产品,多个过滤器有效问题

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

用于分层导航的所有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.

要使其按需工作,必须重新设计为可配置产品和分层导航(Mage_CatalogIndex_Model_Indexer_Eav)索引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)