RelatedProduct
Products can be related to other products in Perfion in many ways. This section starts of by giving a short introduction on how products must be related in Perfion if they should work with EC.
First of all the feature holding the relations must be feature inherited from the feature holding the Product Entity. In the below screenshot the feature RelatedProducts is shown and it indeed inherits from Product (which is the feature holding product-entities).
To create such a feature right-click products and select values similar to RelatedProducts shown in the screenshot below:
The important checkmarks to set are Selectable and Allow Multiple.
With this feature created, RelatedProducts can now be put on the configuration of Product and be filled out with data in Grid or Item Editor in Perfion or by importing these relations. In the below screenshot we have picked 3 related products for the Yellow Jug.
Now the RelatedProducts-feature has been constructed and filled out for a single product, so we are new ready to create a mapping for it.
RelatedProduct | ||
What can be output | Supports | Supported Entities |
a Features* r Attributes r Literals
*Only features that are inherited from the feature mapped from the Product Entity, i.e. typically a feature named Product. In addition, the Product Entity must have a KeyField-mapping. | a Multi value features a Localizable features a Output Kind Parameters | r Site r Category a Product r Variant |
Sample Mappings | ||
| ||
Sample output | ||
<Product id="636" ecommerceproduct="983ST">
…
<RelatedProducts>
<RelatedProduct name="Related Products" perfionname="RelatedProducts">
<Field name="Item No">40511-568-0</Field>
<Field name="Item No">40511-565-0</Field>
<Field name="Item No">10111B</Field>
</RelatedProduct>
</RelatedProducts>
</Product>
|
Table 1: Summary of output kind RelatedProduct.
Notice how the 3 related products (all 3 Related Products on the Yellow Jug that was added in Figure 11) are here added as Fields in a RelatedProduct-element containing Item No-fields. EC simply adds whatever you have defined as KeyField for the Entity, in this case Item No. Item No is mapped from the Value-feature so it is simply the base-values for the related products that are added.
NOTE: It is allowed to have multiple RelatedProduct-mappings. For example, so that related products-features like Accessories, Spare parts and Related products can all be output. Similar to Image- and Attachment-Output Kinds this can be done even to the same “To”-name, so the receiving system will not necessarily need to know that some related products come from one feature and others come from another. The system, however, can still distinguish these by looking at the output perfionname-attribute. In Table 1 we see that the perfionname output is indeed “RelatedProducts”.