0

I'm trying to filter the supercategories that can be referenced by a given product in Hybris Backoffice. For example if we have the following category structure:

CategoryA

SubCategoryA1
SubCategoryA2

CategoryB

SubCategoryB1
SubCategoryB2

Lets say I want my products to be able to reference only subcategories of CategoryB. In the documentation is given an example how to narrow the results and guarantee that all search results would have the same catalog version as the parent-object with a relation to the current editor.

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

What changes should I make in the configuration? I guess I need to somehow restrict the available categories to be a subtype of a given supercategory. Any help would be appreciated!

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
pashkulev
  • 1
  • 2

1 Answers1

0

You can use restrictToType to filter by the specific type:

<wz:property qualifier="item">
                        <wz:editor-parameter>
                            <wz:name>restrictToType</wz:name>
                            <wz:value>Product</wz:value>
                        </wz:editor-parameter>
 </wz:property>
Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
zenith13
  • 53
  • 3