File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,7 @@ public function getFilterableAttributes()
212
212
foreach ($ setAttributeIds as $ attributeId ) {
213
213
if (!isset ($ attributes [$ attributeId ])) {
214
214
$ attribute = $ eavConfig ->getAttribute (Mage_Catalog_Model_Product::ENTITY , $ attributeId );
215
+ if (!$ this ->_filterFilterableAttributes ($ attribute )) continue ;
215
216
if ($ attribute instanceof Mage_Catalog_Model_Resource_Eav_Attribute && $ attribute ->getIsFilterable ()) {
216
217
$ attributes [$ attributeId ] = $ attribute ;
217
218
}
@@ -249,6 +250,17 @@ protected function _prepareAttributeCollection($collection)
249
250
return $ collection ;
250
251
}
251
252
253
+ /**
254
+ * Filter which attributes are included in getFilterableAttributes
255
+ *
256
+ * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
257
+ * @return bool
258
+ */
259
+ protected function _filterFilterableAttributes ($ attribute )
260
+ {
261
+ return $ attribute ->getIsFilterable () > 0 ;
262
+ }
263
+
252
264
/**
253
265
* Retrieve layer state object
254
266
*
Original file line number Diff line number Diff line change @@ -99,6 +99,17 @@ protected function _prepareAttributeCollection($collection)
99
99
return $ collection ;
100
100
}
101
101
102
+ /**
103
+ * Filter which attributes are included in getFilterableAttributes
104
+ *
105
+ * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
106
+ * @return bool
107
+ */
108
+ protected function _filterFilterableAttributes ($ attribute )
109
+ {
110
+ return $ attribute ->getIsVisible () && $ attribute ->getIsFilterableInSearch () > 0 ;
111
+ }
112
+
102
113
/**
103
114
* Prepare attribute for use in layered navigation
104
115
*
You can’t perform that action at this time.
0 commit comments