A Thymeleaf processor that will find related products. A product or category id must be specified. If both are specified, only the productId will be used.
Takes in the following parameters
- productId - productId to find related products.
- categoryId - categoryId to find related products.
- type - the type of relations to find (e.g. FEATURED (DEFAULT), UPSELL, CROSSSELL). Implementations may have other specific types of related products.
- cumulativeResults - true (DEFAULT) /false - indicates that the system should add results from the parent categories of the passed in item as well as the current item
- qty - if specified, determines the max-number of results that will be returned; otherwise, all results are returned.
- productsResultVar - if specified, adds the products to the model keyed by this var. Otherwise, uses "products" as the model identifier.
- relatedProductsResultVar - if specified, adds the RelatedProduct(s) to the model keyed by this var. Otherwise, uses "relatedProducts" as the model identifier.
The output from this operation returns a list of PromotableProducts which represent the following.
relatedProduct.product
relatedProduct.promotionMessage.