在Backoffice中,默认扩展多引用编辑器中的类别缩小到给定类别的子类别

我正在尝试过滤Hybris Backoffice中给定产品可以引用的超类。例如,如果我们具有以下类别结构:

CategoryA

SubCategoryA1
SubCategoryA2

CategoryB

SubCategoryB1
SubCategoryB2

让我们说我希望我的产品只能引用CategoryB的子类别。在documentation中给出了一个示例,该示例说明如何缩小结果范围并确保所有搜索结果具有与父对象相同的目录版本,并与当前编辑器相关。

<editorArea:attribute qualifier="supercategories">
    <editorArea:editor-parameter>
        <editorArea:name>referenceSearchCondition_catalogVersion</editorArea:name>
        <editorArea:value>{parentObject.catalogVersion}</editorArea:value>
    </editorArea:editor-parameter>
</editorArea:attribute>

我应该对配置进行哪些更改? 我想我需要以某种方式将可用类别限制为给定超类别的子类型。  任何帮助将不胜感激!

braveboy0 回答:在Backoffice中,默认扩展多引用编辑器中的类别缩小到给定类别的子类别

您可以使用restrictToType按特定类型进行过滤:

<wz:property qualifier="item">
                        <wz:editor-parameter>
                            <wz:name>restrictToType</wz:name>
                            <wz:value>Product</wz:value>
                        </wz:editor-parameter>
 </wz:property>
本文链接:https://www.f2er.com/3018718.html

大家都在问