Hybris Facet Navigation

user3240544 picture user3240544 · Feb 28, 2014 · Viewed 7.8k times · Source

Does anyone have an idea how to add additional attributes in my Facet Navigation which is displayed on the product list page? So far I can choose only price ranges, but I want to add brands and other filters, do you know how to maintain it via the hMC? I think it has something to do with the solr configurations, but I'm fairly new to hybris...

Answer

Benoit Vanalderweireldt picture Benoit Vanalderweireldt · Oct 13, 2015

Best way is to have a look at what is provided out of the box, under for example the electronic store, open the file /electronicsstore/resources/electronicsstore/import/sampledata/stores/electronics/solr.impex

Inside you will find facets definition, for example this is a facet definition for Megapixles :

INSERT_UPDATE SolrIndexedProperty;solrIndexedType(identifier) unique=true];name[unique=true];type(code);sortableType(code);currency[default=false];localized[default=false];multiValue[default=false];facet[default=false];facetType(code);facetSort(code);priority;visible;fieldValueProvider;customFacetSortProvider;rangeSets(name);$classAttributeAssignment
;electronicsProductType;Megapixel, 63          ;double;; ;    ; ;true;MultiSelectOr;Custom;1000;true;commerceClassificationPropertyValueProvider;numericFacetSortProviderDesc;MegaPixelRange;57:::Megapixel, 63::::

What you need to remember is that for any customized types other that literal/Atomic you would need to create your own provider. For every basic Literal/Atomic type (String,double,integer,boolean) the commerceClassificationPropertyValueProvider would be enough.