Skip to content

Commit e3717cf

Browse files
committed
MAGE-569 Disable category inclusion on currentRefinements until implementation of custom renderer to intercept delete operation on browse
1 parent 96effa6 commit e3717cf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

view/frontend/web/instantsearch.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,13 @@ requirejs(['algoliaBundle', 'Magento_Catalog/js/price-utils'], function (algolia
262262
item: $('#current-refinements-template').html()
263263
},
264264
includedAttributes: attributes.map(attribute => {
265-
console.warn("Refinement:", attribute);
266265
if (attribute.name.indexOf('categories') === -1
267-
|| algoliaConfig.instant.isVisualMerchEnabled
268-
|| !algoliaConfig.isCategoryPage)
266+
|| !algoliaConfig.isCategoryPage) // For category browse, requires a custom renderer to prevent removal of the root node from hierarchicalMenu widget
269267
return attribute.name;
270268
}),
271269
transformItems: items => {
272-
console.log("%cRefinement transform:%o", 'color:green;background:yellow', items);
273270
return items
271+
// This filter is only applicable if categories facet is included as an attribute
274272
.filter(item => {
275273
return !algoliaConfig.isCategoryPage
276274
|| item.refinements.filter(refinement => refinement.value !== algoliaConfig.request.path).length; // do not expose the category root

0 commit comments

Comments
 (0)