Posts

Showing posts with the label OOB Sort by Options

How to add or update Sort by Options in the Hybris?

Case1: Update/remove existing Sort by option If you are looking for update/remove existing Sort by option then you can do it by simply through hmc/backoffice/impex. Go to back-office  SolrIndexedType  and open your Indexed type Go to Solr Sorts tab: Here you can see the list of Sort By option which you can update/delete Case2: Add a custom Sort by option without custom sort logic In case if you want to add new custom Sort by option without any custom sorting logic then you can do it without changing any code. Let's assume I want a new sort by option based on  isPromotedProduct  (boolean) of the Product type. Just  follow the below steps... 1) Define SolrIndexedProperty You need to have SolrIndexedProperty for your attribute and you need to do Solr indexing to reflect its value in the Solr server. Here, I am assuming you know this part very well or you may already have SolrIndexedProperty defined. INSERT_UPDATE SolrIndexedProperty ; solrIndexedType(identifier)[un