Categories doesn't display the catalog items after upgrade

Indira8
Kilo Sage

Hi All,

We have upgraded our customer instance from Qubec to Sandiego. After the upgrade , the categories on the service portal are not displaying the catalog items and I could find a kb article 'https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0994698' . However , I have no knowledge on Service portal and the explanation given in the article is confusing . Could someone please help me what changes to do on our instance to display all the categories in the portal. 

 

Thank you. 

9 REPLIES 9

Yousaf
Giga Sage

Hi,

Find SC Category Page in service portal widget and clone that widget 

find_real_file.png

 

then make these changes like said in kB Article add this 

var unregisterCategorySelected = $rootScope.$on('$sp.service_catalog.category.selected', function(evt, arg) {
    $scope.data.category_id = arg.sys_id;
    $scope.data.catalog_id = arg.catalog_id;
    $scope.data.items = [];
    $scope.showTopLoader = true;
    $scope.data.startWindow = 0;
    $scope.server.update().then(function(result) {
        loadPage();
        $scope.showTopLoader = false;
    });
});


in client controller section

 

find_real_file.png

 

 

and add below line in $scope.$on("$destroy") method

unregisterCategorySelected();

 

find_real_file.png

 

Mark Correct or Helpful if it helps.


***Mark Correct or Helpful if it helps.***

Hi @Yousaf I have done the changes as shown above . However, the list of items is not displaying when the categories are clicked but only when I refresh the page then the items for corresponding categories are displayed. It is working only on refreshing the page everytime. 

Could you please help me understand where the issue is. 

 

Thank you

Yes actually it happens when we use custom widget.

Ok so you cloned the widget or made changes in OOB one??


***Mark Correct or Helpful if it helps.***

Do one thing make these changes to OOB sc category widget without clonning.


***Mark Correct or Helpful if it helps.***