Classification system overview
- 12th Feb 2018
- category feature in hybris classification system what are classification attributes in hybris what is classification system in hybris When we should prefer classification system ? when we should use hybris classification system Why we need to link category feature to product attribute? Why we need to understand classification system in hybris
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
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
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
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.