Skip to Content
author's profile photo Former Member
Former Member

Modify simple search in backoffice

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?

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Feb 14, 2018 at 04:42 AM

    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,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 14, 2018 at 05:06 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 14, 2018 at 10:41 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.