cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced Search in Backoffice by Catalog version

Former Member
0 Kudos

Hi, I'm trying to add a custom ConditionSearchController to filter only staged products in a custom view in backoffice. I followed the official guide:

https://help.hybris.com/6.2.0/hcd/8b5074b3866910149d2bf4072759941e.html

They explain how to filter by custom field and Approval field adding SearchConditionData:

 private static final String APPROVAL_STATUS = "approvalStatus";
 ...
 final FieldType approvalStatus = new FieldType();
         approvalStatus.setDisabled(true);
         approvalStatus.setSelected(true);
         approvalStatus.setName(APPROVAL_STATUS);
 ...
 
 SearchConditionData(approvalStatus, ArticleApprovalStatus.APPROVED, ValueComparisonOperator.EQUALS)

But if I try to add "catalogVersion" field and then add a SearchConditionData

 SearchConditionData catalogCondition = new SearchConditionData(catalogVersion, "Staged", ValueComparisonOperator.EQUALS);

Doesn't work, i have not found a enum class like ArticleApprovalStatus for Catalog version, I suppose it's part of the problem

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member679962
Active Participant
0 Kudos

Hi Leonardo,

Try setting the whole CatalogVersionModel object as condition value, not just it's name in String form.

Regards,
Marcin