Showing posts with the label custom facetSort

How to add custom Sort By Option in Hybris?

Sometime you required to have custom Sort by options in your category or products listing page. In this post, I will explain you all required steps. Note: This post is based on Hybris version V6.0, facetSort(code) is deprecated in SolrIndexedProperty type so it might be removed from the latest release. Define your SortProvider(sizeAttributeSortProvider) bean First, you need to define comparator class (SizeAttributeComparator) and bean definition for the same. Now declare sortProvider(sizeAttributeSortProvider) bean as below which point to OOTB class (DefaultFacetSortProvider). <bean id="sizeAttributeSortProvider" class="de.hybris.platform.solrfacetsearch.config.impl.DefaultFacetSo