Skip to Content
0
Former Member
Mar 04, 2019 at 10:02 AM

Product cockpit customization: add operator

455 Views

Hi ,

I need to bring greater than operator for "Time Modified" attribute in product cockpit filter. I am able to get the attribute in Product cockpit. Operator by default its coming as equal and contains. Below changes done in extensionbackoffice-backoffice-config.xml.

     <ful:fulltext-search xmlns:ful="http://www.hybris.com/cockpitng/config/fulltextsearch">
         <ful:field-list>
         </ful:field-list>
         <ful:field name="modifiedtime" selected="true"/>
         <ful:preferred-search-strategy>flexible</ful:preferred-search-strategy>
         <ful:operator>AND</ful:operator>
         </ful:fulltext-search>
         
         </context>
         
      <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="modifiedtime" selected="true"/>
             </ful:field-list>
             <ful:preferred-search-strategy>solr</ful:preferred-search-strategy>
             <ful:operator>OR</ful:operator>
     </ful:fulltext-search>                
     </context>
         
     <context type="Product" component="advanced-search" merge-by="type" parent="GenericItem" >
            <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="modifiedtime" operator="greater"/>
      </advanced-search:field-list>
      </advanced-search:advanced-search>
         </context>

Any pointers will be helpful.

Thanks, Geetha