mysql - Filterable attribute not showing in filters -
i have attribute set filterable (with results)
in use in layered navigation
. i've reindexed, cleared cache, turned off flat tables, can't show on filters.
i've tracked down in catalog_product_index_eav
table other filterable attribute ids in there mine missing.
i've tracked down query in mage_catalog_model_layer_filter_attribute::_getitemsdata()
checks see how many products there given attribute. if it's empty, doesn't show attribute
select `warehousecheckout_warehouses_idx`.`value`, count(warehousecheckout_warehouses_idx.entity_id) `count` `catalog_product_flat_11` `e` inner join `catalog_category_product_index` `cat_index` on cat_index.product_id=e.entity_id , cat_index.store_id=11 , cat_index.visibility in(2, 4) , cat_index.category_id='11' inner join `catalog_product_index_price` `price_index` on price_index.entity_id = e.entity_id , price_index.website_id = '1' , price_index.customer_group_id = 0 inner join `catalog_product_index_eav` `warehousecheckout_warehouses_idx` on warehousecheckout_warehouses_idx.entity_id = e.entity_id , warehousecheckout_warehouses_idx.attribute_id = '198' -- attr id want filter , warehousecheckout_warehouses_idx.store_id = '11' group `warehousecheckout_warehouses_idx`.`value`;
but there no rows attribute_id = '198'
attribute never shown. why isn't attribute getting indexed? created via install script , not through admin it's possible value somewhere missed.
there no straight answer this. go way :
remove other conditions , fire query , check if result add 1 condition , continue till find condition thats resulting in required row being eliminated.
what see that: warehousecheckout_warehouses_idx.entity_id = e.entity_id , warehousecheckout_warehouses_idx.attribute_id = '198' -- attr id want filter , warehousecheckout_warehouses_idx.store_id = '11'
also , cat_index.category_id='11'
there few more either category id or store id should reason.
Comments
Post a Comment