The Related Products component is a server-side component written in HTL, allowing to display a list of related products in a carousel style. This component actually reuses the Product Carousel component to display the products. The products are retrieved from Magento via GraphQL. This component can be used on any experience page.
- Display a list of related products, based on a selected product or the current product of the generic product page.
- Carousel navigation via next/previous indicators
- Style System support.
The Related Products component uses the com.adobe.cq.commerce.core.components.models.productcarousel.ProductCarousel
Sling model as its Use-object. However, the implementation of the Sling Model is different.
The following configuration properties are used:
./enableAddToCart
- displays the 'Add to Cart' button on the products (defaultfalse
)./enableAddToWishList
- displays the 'Add to Wish List' button on the products (defaultfalse
)./type
- defines the default HTML heading element type (h1
-h6
) this component will use for its rendering
The following properties are written to JCR for this component and are expected to be available as Resource
properties:
./jcr:title
- Optional title text./titleType
- will store the HTML heading element type which will be used for rendering; if no value is defined, the component will fallback to thetype
value defined by the component's policy. The property of the policy is calledtype
so we can reuse thecore/wcm/components/commons/datasources/allowedheadingelements/v1
Servlet from the WCM components../linkTarget
- defines the link target of the links generated for the component../enableAddToCart
- displays the 'Add to Cart' button on the products (defaultfalse
)./enableAddToWishList
- displays the 'Add to Wish List' button on the products (defaultfalse
)./product
- an optional product SKU defining the product for which we want to display the related products. If empty, the component will use the URL selector to find the product../relationType
- a mandatory relation type, defining the relation between the product and the "related" products. In Magento, there are 3 possible types for this relation:related_products
,upsell_products
, andcrosssell_products
../id
- defines the component HTML ID attribute
See the Product Carousel component.
- Vendor: Adobe
- Version: v1
- Compatibility: AEM as a Cloud Service / AEM 6.4 / 6.5
- Status: production-ready