cancel
Showing results for 
Search instead for 
Did you mean: 

Modify simple search in backoffice

Former Member
0 Kudos

I'm trying to modify the simple search behaviour for the promotions. I want to search only on the 'name' field. I did this:

 <context type="PromotionSourceRule" component="simple-search">
     <yss:simple-search xmlns:yss="http://www.hybris.com/cockpitng/config/simplesearch">
         <yss:field name="name"/>
     </yss:simple-search>
 </context>

but the problem is that the field 'name' is localized and my simple search now is searching only for the english language.

I have also german and dutch localization and I would to search also in these languages.

Any idea?

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member679962
Active Participant
0 Kudos

Hi Irene,

What you are observing right now is correct behavior. If you configure advanced search widget to use localized field in simple search mode (by specifying simple-search configuration) it will make it in simplest possible way, i.e. search only by active language. That's the language you choose on login page. If you choose e.g. espanol during login the search will use values for es locale. If you want to choose the language for which you want to run the search you have to switch the widget to advanced search mode.

Cheers,
Marcin

Former Member
0 Kudos

I believe OOTB doesn't support this. However you can create your own custom one. For reference you can check "LocalizedSimpleEditor".

0 Kudos

Hi , you can do it by defining new attribute name (locale ) in PromotionSourceRule itemtype , or you can create your own custom simple Search Widget

Regards,