How to order catalog items on SC Category Page?

cindylove
Kilo Guru

The catalog items on my SC Category Page are not showing in the same order that they are in the Service Catalog in the instance. 

They sort by order in the Service Catalog in the instance.

I have put all of my catalog items in 'Order', so that's not the issue. I understand that catalog items are supposed to be sorted in ascending order by their Order value. If they don't have Order set, they are ordered by Name. 

I have tried to re-add them to the category, but I still can't change their order on the SC Category Page. 

I want my cat items to display from right to left in this order: 

Report an Issue       Submit a Request/Inquiry        Product Data/Pricing/Catalog Request

This is how they currently display on the SC Category Page

find_real_file.png

 

Any ideas?

 

 

1 ACCEPTED SOLUTION

cindylove
Kilo Guru

We had to add a line of code in the SC Category page to sort by order.

View solution in original post

4 REPLIES 4

Raju Koyagura
Tera Guru

What is the catalog items  (Report an Issue,  Submit a Request/Inquiry, Product Data/Pricing/Catalog Request) order?

This is the order:

Report an Issue = 10

Submit a Request/Inquiry = 20

Product Data / Pricing / Catalog Request = 30

 

The catalog items show up in this order in the Service Catalog, but not in the portal.

cindylove
Kilo Guru

We had to add a line of code in the SC Category page to sort by order.

In SC Category Page widget, orderBy code already existing, if you want to change something better clone the widget and modify the code then add the new widget to the page by removing the OOB widget.

var scRecord = new sn_sc.CatalogSearch().search(catalog, categoryId, '', false, options.show_items_from_child != 'true');
scRecord.addQuery('sys_class_name', 'NOT IN', 'sc_cat_item_wizard');
scRecord.addEncodedQuery('hide_sp=false^ORhide_spISEMPTY');
scRecord.orderBy('order');
scRecord.orderBy('name');
scRecord.query();