‎2019 Sep 20 8:20 AM - edited ‎2024 Feb 04 6:21 AM
Hi All,
In one of our requirement, we need to add "sync status" as a search criteria in Product advance search in backoffice. User will see 'sync status' as a dropdown search criteria where user can search on either "synced" or "unsynced".
Any pointers on this requirement ?
Thanks.
Request clarification before answering.
It seems it is impossible with "-backoffice-config.xml" approach, but I made it using Backoffice Products Solr Index. Just added a new facet:
$solrIndexedType = solrIndexedType(identifier)[unique = true, default = 'BackofficeProduct'];
INSERT_UPDATE SolrIndexedProperty; name[unique = true]; $solrIndexedType; type(code); fieldValueProvider; multiValue; includeInResponse[default = false]; facetType(code)[default = 'MultiSelectOr']; facet[default = true]; backofficeDisplayName[lang=en] ; syncStatus ; ; boolean ; syncStatusValueResolver ; false ; ; ; ; Sync Status;syncStatusValueResolver - this is bean, that extends AbstractValueResolver<ItemModel, Object, Object> and inside it could use logic from com.hybris.backoffice.sync.facades.SynchronizationFacade.isInSync

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bidyadhar Tripathy we can achieve this by going to the code as below . If we wnated to see how it works for the OOTB code , please go throgh the below file and customize it accordingly as per the project XXX-backoffice-config.xml
If we wanted to display the list drop-down just go thorough the existing configuration search field for product type approvalStatus .
<advanced-search:field name="approvalStatus" selected="false"/>If the value is selected="true" It would be shown up as an advanced search filed automatically during the product advanced search.
platformbackoffice/resources/platformbackoffice-backoffice-config.xml
<context type="Product" component="advanced-search" merge-by="type" parent="GenericItem">
<advanced-search:advanced-search>
<advanced-search:field-list>
<advanced-search:field name="code" selected="true" operator="contains"/>
<advanced-search:field name="name" selected="true" operator="contains"/>
<advanced-search:field name="catalogVersion" selected="true" operator="equals"/>
<advanced-search:field name="variantType" selected="true" operator="equals"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bidyadhar Tripathy I have assumed that it is an attribute that was custom-defined in the type system during modeling the product . Then this might not work.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 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.