cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the listing order for products in backoffice ?

senerkucuknane1994
Discoverer
0 Kudos

Hi,

I am trying to change the products listed in the backoffice in Products screen and also in the wizard selections in a fashion that they will be listed via their modified time descending. I have tried solr sort, solr query template, changing the solr index for backoffice product type, changing the backoffice config xml to have the simple search use modifiedtime as sort field and have asc="false" as well but nothing worked. I would be glad if anyone helped.

Accepted Solutions (0)

Answers (1)

Answers (1)

safin
Advisor
Advisor

Hi Sener,

There are three search options for products in Backoffice

  • solr simple search
  • simple search
  • advanced search

For solr simple search, you can not configure the sort, it is always score based (descending), for other two search options, you can use "sortable" attribute for specific column.

For you case, you can change cockpit-config.xml (or create a new ybackoffice based extension, re-define listview for product in *backoffice-config.xml) like this:

   <context merge-by="type" parent="GenericItem" type="Product" component="listview" module="platformbackoffice">
        <lv:list-view >
            <lv:column label="" qualifier="preview" spring-bean="previewListCellRenderer" width="90px"/>
            <lv:column qualifier="code"/>
            <lv:column hflex="true" qualifier="name"/>
            <lv:column label="product.status.column.label" qualifier="productStatus" spring-bean="productStatusRenderer" width="120px"/>
            <lv:column qualifier="catalogVersion"/>
            <lv:column qualifier="modifiedtime" sortable="true" />
        </lv:list-view>
    </context>

It should work for most of sap commerce versions (i just tried it in 2105):

Please note, i also tried in 2205, it doesn't work, i think this should be a bug in 2205 since even property "code" and "name" can not be sortable (these two properties should be sortable by default)!

Hopefully, it can help you a little.

senerkucuknane1994
Discoverer
0 Kudos

Hi Gang,

Thanks for your comment. I have actually tried using the sortable="true" parameter but it does not work for me, i am using 2105.14 version of commerce cloud. As you said for 2205 version none of the list view properties are sortable in my instance as well, so i think the same bug is in 2105.14 version as well. Do you know if SAP has any tickets for this bug ?

safin
Advisor
Advisor
0 Kudos

Hi Sener,

i just tried it in 2105, it worked, you can see it in the attached image. Would you please refresh and try it?

As of 2205, it doesn't work in my machine, i just suspect it's a bug, currently there is no ticket for it.

Thanks.