我正在尝试修改促销的简单搜索行为。我只想在"名称"字段上搜索。我这样做了:
<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>
但问题是"名称"领域是本地化的,我的简单搜索现在仅在搜索英语。
我也有德语和荷兰本地化,我也将以这些语言进行搜索。
有什么想法?
您不能将simple-search
用于本地化字段。您必须配置您的语言,请参阅com.hybris.cockpitng.editor.localized.LocalizedSimpleEditor
并使用高级搜索小部件。
本地化simpleeditor
描述
在高级搜索小部件中应用的本地化编辑器的下拉列表版本。
类型
引用必须以以下格式提供的任何类型的引用,例如:
本地化simple(java.lang.string( 局部简单(java.lang.integer( 局部简单(参考(PRODUDS((
示例:
<as:field editor="com.hybris.cockpitng.editor.localized(com.hybris.cockpitng.editor.defaulttext)" .../>
高级搜索小部件示例
<context type="Product" component="advanced-search">
<as:advanced-search xmlns:as="http://www.hybris.com/cockpitng/config/advancedsearch" connection-operator="AND">
<as:field-list disable-attributes-comparator="false" disable-subtypes-checkbox="false">
<as:field name="code" operator="equals" selected="true"/>
<as:field name="approvalStatus" operator="equals" selected="false"/>
<as:field editor="com.hybris.cockpitng.editor.defaultlong" name="pk" operator="less" selected="true" sortable="false"/>
<as:field name="modifiedtime" operator="greaterOrEquals" selected="true"/>
</as:field-list>
<as:sort-field name="code" asc="false" />
</as:advanced-search>