Magento - 分层导航、可配置产品、多个过滤器活动问题 [英] Magento - Layered navigation, configurable products, multiple filters active issue

查看:25
本文介绍了Magento - 分层导航、可配置产品、多个过滤器活动问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我在 Magento (1.7) 商店中有一个可配置的产品T-Shirt-A",它有红色(1,2 号)和黑色(2 号).

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

在分层导航中如果我选择黑色"和尺寸 1"

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

  • 我不想看到任何结果 - 因为没有提供黑色"和尺寸 1"的简单产品.
  • 相反,我看到T-Shirt-A"是因为它有黑色和 1 号(但是,没有任何相关的简单产品同时满足这两个标准)

我该怎么做才能获得我想要的搜索结果(让过滤器显示可配置的产品,这些产品至少具有一个符合所有过滤条件的关联简单产品).

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

推荐答案

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

这篇关于Magento - 分层导航、可配置产品、多个过滤器活动问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆