Automatic Creation of the Category Hierarchy
You can generate a category hierarchy based on existing attributes registered in Quant. Quant will automatically create parent categories and subcategories and fills them with products with the same attribute value.
In this manual you will find:
- How to automatically generate category hierarchies by category names?
- How to automatically generate category hierarchy by category ID?
- How to assign an external Id when creating a hierarchy?
To automatically generate a category hierarchy, use the Create Hierarchy button in the Categories section.
How to automatically generate category hierarchies by category names?
1. Set attributes for each level of the hierarchy in the Products section.
In Quant, you must first determine which attribute will be used for the first, second, or third and next levels of categorization. In this case, 3 optional properties (Category 1, Category 2 and Category 3) have been created, each representing one level of categorization.
- Category 1 - Level 1 = e.g. Dairy products
- Category 2 - Level 2 = e.g. Milk, Yogurt, Butter
- Category 3 - Level 3 = e.g. Milk Box, Milk Bottle
To learn how to create a custom property, see the Creating Custom Product Properties manual.
2. Click on the Create Hierarchy button in the Categories section.
Create Hierarchy button
3. Add attributes that will be used to categorize products.
In the new window, add the attributes you use to categorize products via button Hierarchy Attributes. Add attributes in order from the first level to the last level of categorization. In our case, it will be in the order of Category 1, Category 2 and Category 3.
You can see which level of the hierarchy the attribute will create in the Order column. If you want to change this setting, you can use the arrow buttons to change the order.
4. For categories, you can set some properties in the properties panel on the right.
5. Click OK to preview the hierarchy you are creating.
Hierarchy preview
6. Click to Ok.
The hierarchy will be created according to the attributes you specify. According to our example, the second level of the hierarchy will be made up of the attribute Category 1, the third from the attribute Category 2, and the fourth from the attribute Category 3. The parent category that creates the first level of the hierarchy was filled in the previous step in the Root Category Name row.
The advantage of the hierarchy created in this way is that a product filter will be created automatically for each category and the categories will be filled with products. The product filter created for the Milk Box category can be seen in the following two pictures.
Product filter for Boxed milks
How to automatically generate category hierarchy by category ID?
If you keep a record of category IDs in Quant in addition to the category name, it is better to use the category IDs to create the hierarchy, which will then be the key for the product filter. This is because a typo can often occur in the text name of a category, whereas errors of this type do not occur as often with IDs.
1. In the Categories section, click Create Hierarchy.
2. In the new window, click into the Hierarchy Attributes line and select the category ID that you defined.
3. In the Name attribute box, assign a property to represent the category name.
If you did not fill in the Name attribute, the categories would be named by ID.
How to assign an external Id when creating a hierarchy?
Similar to the previous example, it is possible to set an external Id attribute for a category. You can use this if you are used to using category IDs in your system. This ID does not affect the product filter or category name in any way, you will only see the ID for each category in the External Id column.
You can read more about creating categories and their settings in the Basic Settings of Categories manual.