Try our conversational search powered by Generative AI!

Showing item list count in commerce


Hello, Is there a way out where we could display count of items/products under a category in commerce? Currently default view shows items in property view but we would like to make sure we have total count displayed in property view. 

Here is the sample list where we would like to display count.

Apr 08, 2022 12:33


There is no official way of doing this unfortunately. The Catalog UI is in need of a refresh if you ask me.

It should be possible to achieve it with a custom ViewConfiguration and some dojo/dijit code. Here is a pointer in the right direction:

ViewConfiguration (backend):

First of all you will need to create a custom view configuration. It must have the same key as the default view. Here is an example:

public class CategoryViewConfiguration : ViewConfiguration<NodeContentBase>
    public CategoryViewConfiguration()
        Key = CommerceViewConfiguration.CatalogContentListViewName;
        LanguagePath = "/commerce/contentediting/views/cataloglist";
        ControllerType = "catalog-ui/CatalogContentList"; // The default ControllerType is epi-ecf-ui/widget/CatalogContentList. You have to create your own and inherit from default.
        IconClass = "epi-iconList";
        SortOrder = 250; // Needs to be lower than 300 which is used by the default configuration.
        Category = CommerceViewConfiguration.CatalogCategory;

Dojo/dijit widget (~/ClientResource/catalog-ui/v1/CatalogContentList.js):

], function (declare, lang, CatalogContentList) {
    return declare(
        [CatalogContentList], {
            // Add new and/or override logic here

Module.config sample to map catalog-ui to ~/ClientResources/catalog-ui/v1 path:

<?xml version="1.0" encoding="utf-8"?>
  <clientResources />
      <add name="catalog-ui" path="catalog-ui/v1" />
Edited, May 17, 2022 12:46
- May 17, 2022 12:54
Thanks Matt, I'll try out and let you know
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.