cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to add filter options to backoffice productcockpit perspective

Former Member
0 Likes
2,787

Hi, I have created a custom backoffice extension and I am trying to add my custom product's properties as an option to filter inside backoffice on productcokpit perspective. I have tried:

     <context merge-by="type" type="Product" component="advanced-search" >
         <advanced-search:advanced-search xmlns:advanced-search="http://www.hybris.com/cockpitng/config/advancedsearch">
             <advanced-search:field-list>
                 <advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="myProperty" selected="false"/>
         </advanced-search:field-list>
     </advanced-search:advanced-search>
     </context>

But this way I am able to customize just the standard backoffice and not the productcockpit perspective. How do I customize the productcockpit perspective?

Accepted Solutions (1)

Accepted Solutions (1)

former_member625836
Active Contributor
0 Likes

Hi ,

There is no Advanced search widget on Product Cockpit in Backoffice - this configuration may not affect the this perspective. Product Cockpit mandatory uses Solr in Search&Browse view with multiple way of narrowing results:

  1. Catalog/Category tree

  2. Solr facets

  3. Simple Search and Filters incl. quick filter with simple input and detailed filtering mechanism

I'm guessing that you want to extend the list of fields available in filtering mechanism of Simple Search and Filters. If so, then you need to extend different configuration. Please take a look at widget documentations for details. In my opinion you should go in direction of something like below:

     <context component="pcmbackoffice-fulltext-search" type="Product">
         <ful:fulltext-search xmlns:ful="http://www.hybris.com/cockpitng/config/fulltextsearch">
             <ful:field-list>
                 <ful:field name="myProperty" />
             </ful:field-list>
         </ful:fulltext-search>
     </context>

Cheers, Jacek

Former Member
0 Likes

Hi jacek, thank you for your answer, I have added my property to be indexed on backofficeProduct indexedType and it has appeared as a filter option. The problem now is that it's not working, it's a boolean property and if I try to search for true or false using just my property as a filter option I have 0 results.

Former Member
0 Likes

It's working now, my property is a boolean and when I select my property with "contains" true it returns 0 results, but if o select "equals" true it works. I just have to figure out how to hide the "contains" option for boolean properties

former_member625836
Active Contributor
0 Likes

Hi ,

Have a look at com.hybris.backoffice.widgets.fulltextsearch.FullTextSearchStrategy interface and its default implementation com.hybris.backoffice.widgets.fulltextsearch.DefaultFullTextSearchStrategy. It is used in com.hybris.backoffice.widgets.fulltextsearch.renderer.impl.DefaultFieldQueryFieldRenderer.

Cheers, Jacek

Answers (0)