You'll need a slight change in the template for this. Find the following snippet on product.html:
Code: Select all
<section id="right_column">
<header>Featured Products</header>
<div id="options">
<div class="section">
<blc:related_products productId="${product.id}"/>
<ul id="featured_products" class="group">
<li th:each="relatedProduct : ${relatedProducts}" th:object="${relatedProduct.product}" th:include="catalog/partials/productListItem" class="product_container"></li>
</ul>
</div>
</div>
</section>
Say that you want to use the Cross Sale Products list. Change the blc:related_products invocation to this:
Code: Select all
<section id="right_column">
<header>Featured Products</header>
<div id="options">
<div class="section">
<blc:related_products type="CROSS_SALE" productId="${product.id}"/>
<ul id="featured_products" class="group">
<li th:each="relatedProduct : ${relatedProducts}" th:object="${relatedProduct.product}" th:include="catalog/partials/productListItem" class="product_container"></li>
</ul>
</div>
</div>
</section>
There is also one bug here in the code. You'll need to modify the <li th:object parameter to use 'relatedProduct.relatedProduct' in order for it to work as you expect. So the final code snippet would be:
Code: Select all
<section id="right_column">
<header>Featured Products</header>
<div id="options">
<div class="section">
<blc:related_products type="CROSS_SALE" productId="${product.id}"/>
<ul id="featured_products" class="group">
<li th:each="relatedProduct : ${relatedProducts}" th:object="${relatedProduct.relatedProduct}" th:include="catalog/partials/productListItem" class="product_container"></li>
</ul>
</div>
</div>
</section>