没有显示我有被设置为Filterable (with results)
在Use In Layered Navigation
的属性。我重新编制索引,清除了缓存,甚至关闭了平板电脑,但我无法将它显示在滤镜上。可筛选属性在过滤器
我在catalog_product_index_eav
表中的所有其它过滤属性ID都在那里找到了,但我的丢失。
我已经找到了在Mage_Catalog_Model_Layer_Filter_Attribute::_getItemsData()
此查询,检查,看看有多少产品有一个给定的属性。如果它是空的,它并不显示属性
SELECT
`warehousecheckout_warehouses_idx`.`value`,
COUNT(warehousecheckout_warehouses_idx.entity_id) AS `count`
FROM `catalog_product_flat_11` AS `e`
INNER JOIN `catalog_category_product_index` AS `cat_index`
ON cat_index.product_id=e.entity_id
AND cat_index.store_id=11
AND cat_index.visibility IN(2, 4)
AND cat_index.category_id='11'
INNER JOIN `catalog_product_index_price` AS `price_index`
ON price_index.entity_id = e.entity_id AND price_index.website_id = '1'
AND price_index.customer_group_id = 0
INNER JOIN `catalog_product_index_eav` AS `warehousecheckout_warehouses_idx`
ON warehousecheckout_warehouses_idx.entity_id = e.entity_id
AND warehousecheckout_warehouses_idx.attribute_id = '198' -- attr id i want to filter by
AND warehousecheckout_warehouses_idx.store_id = '11'
GROUP BY `warehousecheckout_warehouses_idx`.`value`;
但也有attribute_id = '198'
没有行,所以属性永远不会显示。为什么这个属性没有被索引?它是通过安装脚本创建的,而不是通过管理员创建的,所以有可能在某处丢失了某个值。
您是否设置了 - * category-> display setting->是否将锚点设置为“Yes”* – aforankur 2013-05-14 05:53:43
@Anx它不是一个类别。这是一个属性。 – 2013-05-14 17:16:28