on 2024 Oct 21 9:15 AM
Is it possible that in backoffice to add a new field in the customerReview advanced-search, to search for customer reviews by the product code, ootb i can search by the product itself:
<context merge-by="type" parent="GenericItem" type="CustomerReview" component="advanced-search"> <advanced-search:advanced-search xmlns:advancedsearch="http://www.hybris.com/cockpitng/config/advancedsearch"> <advanced-search:field-list> <advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="product" selected="true"/> </advanced-search:field-list> </advanced-search:advanced-search> </context>
I tried this but it didn't work:
<context merge-by="type" type="CustomerReview" component="advanced-search"> <advanced-search:advanced-search> <advanced-search:field-list> <advanced-search:field name="product.code" selected="true"/> </advanced-search:field-list> </advanced-search:advanced-search> </context>
Request clarification before answering.
Hi @AlexAndrew
Not sure which version of hybris you are using. But the ootb "customerreview-backoffice-config.xml" file already have the required code in place to show Product in Customer Review in Advance Search along with other fields.
<context merge-by="type" parent="GenericItem" type="CustomerReview" component="advanced-search">
<advanced-search:advanced-search xmlns:advanced-search="http://www.hybris.com/cockpitng/config/advancedsearch">
<advanced-search:field-list>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="alias" selected="false"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="approvalStatus" selected="true"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="blocked" selected="true"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="comment" selected="false"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="headline" selected="true"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="language" selected="true"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="product" selected="true"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="rating" selected="true"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="user" selected="true"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="comments" selected="false"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="creationtime" selected="true"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="itemtype" selected="false"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="modifiedtime" selected="false"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" name="owner" selected="false"/>
<advanced-search:field xmlns="http://www.hybris.com/cockpitng/config/advancedsearch" editor="com.hybris.cockpitng.editor.defaultlong" name="pk" selected="false"/>
</advanced-search:field-list>
</advanced-search:advanced-search>
</context>
Just try to reset your backoffice in the orchestration mode by login into backoffice as Admin
-> pressing F4 -> reset everything -> F4
You can also see the cockpit-config.xml file in the orchestration mode to see if the changes are there or not in the xml file when your server is running.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Alex,
In this case you need to have Product Code as field in your Customer Review Model.
Reason being - Advance Search work on the type of the attribute which is there in the main model. In your case customerReview is the main model, hence the product attribute which is of type productModel can only be used.
User | Count |
---|---|
19 | |
14 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.