Categories are used in Elevate to understand products at a high level. Supplying Elevate with category information in a consistent manner is crucial to this. The attribute
categories is set on the product level in the data feed and is used for entering this information to define a products place in a product-based categorization hierarchy. Each level in the hierarchy is defined by the greater than-sign,
<categories>gardening tools > chain saws</categories>
If a product is present in another product-based categorization, this can also can be entered in the
categories attribute. The different hierarchies are separated with a pipe character,
<categories>gardening tools > chain saws|power tools > chain saws</categories>
Other category types
A product can be present on other pages than a page that is based on the product-based categorization, such as a brand page, an inspiration page, or a sales page. It is recommended to use custom attributes for these categories instead of using the
categories attribute e.g.,
<categories>gardening tools > chain saws</categories> <custom_attributes> <brand_category>brands > husqvarna > chain saws<brand_category> <inspirational_pages>inspiration > trim your garden<inspirational_pages> </custom_attributes>
If the different categorizations are not easily separated, Elevate will accept them in the categories attribute e.g.,
<categories>gardening tools > chain saws|brands > husqvarna > chain saws|inspiration > trim your garden</categories>
It might lead to slightly worse understanding than separating them, but the most important thing is that the product based categorization is provided.
Using categories to define pages¶
categories attribute can be used to make product selections (to e.g. define pages) if it is convenient, otherwise a custom attribute can also be used for this. If using
categories for product selections be careful with consistency when using spaces. For example,
gardening tools > chain saws is not the same page as
gardening tools>chain saws. If using
categories to create pages, it recommended to repeat values in it so that the product shows up on its parent's pages e.g.
<categories>gardening tools|gardening tools > chain saws</categories>
The alternative is to only supply the leaf nodes, e.g.
gardening tools > chain saws, but then the filters for pages high up in the hierarchy can get too big since they need to list all the leaf nodes.
For the purpose of defining pages, the
categories attribute have support for the attribute name feature. If using
name, then the human readable category information needed by Elevate should be in the names e.g.
<categories name="gardening tools|gardening tools > chain saws">yw1|yw10</categories>