Skip to content

Commit

Permalink
Fix related products section
Browse files Browse the repository at this point in the history
  • Loading branch information
riteshadhikari17 committed Jul 21, 2020
1 parent 5db6fbb commit 51f6702
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions site/src/main/resources/webTemplates/catalog/product.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,20 @@ <h4 class="panel-title">
<hr/>

<!-- Related products -->
<div class="related-products"
th:with="relatedProducts=${#related_products.findByProduct(product.id)}"
th:unless="${#arrays.isEmpty(relatedProducts)}">
<h3 class="text-center" th:text="#{category.featuredProducts}"></h3>
<div class="row">
<div class="col-sm-6 col-md-3" th:each="product : ${relatedProducts}" th:object="${product}"
th:include="catalog/partials/productListItem"
th:if="${product.isActive()}">
<div class="row">
<div class="container">
<div class="related-products"
th:with="relatedProducts=${#related_products.findByProduct(product.id)}">
<h3 class="text-center" th:text="#{category.featuredProducts}"></h3>
<div class="row">
<div class="col-sm-6 col-md-3" th:each="product : ${relatedProducts}" th:object="${product}"
th:include="catalog/partials/productListItem"
th:if="${product.isActive()}">
</div>
</div>
</div>
</div>
</div>

</div>
</div>

0 comments on commit 51f6702

Please sign in to comment.