Category component in CIF core components | Community
Skip to main content
Level 2
September 3, 2024
Solved

Category component in CIF core components

  • September 3, 2024
  • 2 replies
  • 1134 views

Hello Team,

 

is there any category component in CIF core component? While exploring, I came to know about Featured Category List: 

https://github.com/adobe/aem-core-cif-components/tree/master/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist

 

Anyone used this component? In my case, I wanted to have a component, where I will pass the category ID (or the category name: will be unique) to a graphQL. In the response, I will get the sub category details( sub category names and its images).

 

For example:  category1 -> In the response, I will get

sub-category1, abc.com/images/category1.jpg

sub-category2, abc.com/images/category2.jpg

sub-category3, abc.com/images/category3.jpg

 

I thought of using the Featured Category List component.

 

cc @hemalatha  @amanath_ullah  @mukeshyadav_ @pulkitvashisth @daniel_gordon 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by AMANATH_ULLAH

Hi @amanath_ullah 

 

What is the purpose of this component?

https://github.com/adobe/aem-core-cif-components/tree/master/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist

 

/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist

 

- Thanks


@maheshagu 

I havent used featuredcategorylist component, but from the documentation, it looks to be a kind of card component where authors can author multiple categories manually using multified in static pages and set href to redirect to respective category pages

It does not fetch subcategory details

 

2 replies

AMANATH_ULLAH
Community Advisor
Community Advisor
September 3, 2024

 

@maheshagu 

You can use productlist component. It provides the details of all the products related to particular category

https://github.com/adobe/aem-core-cif-components/tree/master/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/productlist/v1/productlist

 

 

 

Amanath Ullah
MaheshaGuAuthor
Level 2
September 3, 2024

Thanks @amanath_ullah   for your reply.

I need to use the component productlist that you have mentioned for a scenario: Get list of products based on category.

But, in my case, before this, I need to get the sub category list only.

I mean I will pass the category ID (or the category name: will be unique) to a graphQL. In the response, I will get the sub category details( sub category names and its images).

 

For example:  category1 -> In the response, I will get

sub-category1, abc.com/images/category1.jpg

sub-category2, abc.com/images/category2.jpg

sub-category3, abc.com/images/category3.jpg

AMANATH_ULLAH
Community Advisor
Community Advisor
September 3, 2024

@maheshagu 

To get the sub categories, you will have to use custom graphQl query.

productlist will only give the products related to category 

Amanath Ullah
kautuk_sahni
Community Manager
Community Manager
September 13, 2024

@maheshagu Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni