Classification system overview

We know that in Hybris we have Product Catalog type system which defines categories and products in a hierarchical way.

In the same way we have another type system called Classification system.

This type system also defines categories in a hierarchical way and these categories are called as classifying categories.

We can use these classifying categories to assign category features to one or more products and product categories defined in the Product catalog.

We can represent the same using below diagram

classification-system-overview1

Note:
Category features are also referred to as classification attributes


Classification attributes or category features acts like a container which holds the product specific value of the corresponding attribute.

We can understand this more clearly with below requirement

Requirement : Assume some of the products in our product catalog requires color attribute and some of the products does not require color attribute.

We can approach the solution for the above requirement using classification system as below

We need to define a new classification attribute or category feature called “color”

We can assign this classification attribute to only required products or categories of our product catalog system.

The actual value of the color is never stored as part of classification system but it resides with the corresponding product in the product catalog.

It means it is displayed just like any other attributes of product.

In this way, the actual attribute of product “color” exist only when we assign “color category feature” to product or product category.

This is called as category feature – product attribute linking

Or

classification attribute – product attribute linking

Why we need to link category feature to product attribute?


We can get this question if we understand the data modeling part of it.

We can achieve the same by adding new attribute inside Product item type in items.xml rather than defining classification system and assigning category feature to product.

Why we need to understand classification system for the same?


When we define attribute as part of product model in items.xml then this attribute will be a part of each and every product of our product catalog.

But some of our products in the product catalog may not need this attribute at all.

Example: Some electronics products like Processor, RAM will not have color option but we need color attribute for other products like Mobile phones, Camera etc

In this case, rather than defining color attribute in product item type, if we use classification system, we can assign color classification attribute to only those products or categories which needs color option.

Classification system details

Classification system is also very similar to product catalog in its hierarchy

Classification system will have one or more classification system versions

Classification system version will have one or more classifying categories

Classifying categories will have category feature also called classification attribute which will be assigned to products or categories of product catalog

We can see the same in the below diagram

classification-system-overview2

The Category Features defined within the Classifying Category are displayed as product attributes once allocated to the product catalog

When we should prefer classification system ?


1) When we need to define product attribute only for selected number of products rather than defining for each and every product

2) When we are not sure about the lifetime of the attribute which may become unnecessary after few weeks or months.

3) When we need to add product attributes dynamically at runtime.

Note :
We can create more than one classification system also when we have large variety of products to be classified.

About the Author

Founder of javainsimpleway.com
I love Java and open source technologies and very much passionate about software development.
I like to share my knowledge with others especially on technology 🙂
I have given all the examples as simple as possible to understand for the beginners.
All the code posted on my blog is developed,compiled and tested in my development environment.
If you find any mistakes or bugs, Please drop an email to kb.knowledge.sharing@gmail.com

Connect with me on Facebook for more updates

Share this article on