Multiple Categories

This commit is contained in:
Ben PC
2022-03-30 14:52:20 +02:00
parent e6eeecbf44
commit a110b71377
2 changed files with 12 additions and 5 deletions

View File

@@ -22,7 +22,14 @@
<p class="seller">Verkäufer: <%= product.sellerName%></p><br>
<p class="product-detail"><b>Preis:</b> <%= product.price.toFixed(2) %> € / Stück</h2>
<p class="product-detail"><b>Kategorie:</b> <%= category.name %></h2>
<p class="product-detail"><b>Kategorien:</b>
<% for (var i=0; i < categories.length; i++) {
%><%=categories[i]["name"] %><%
if (i != (categories.length - 1)) {
%>, <%
}
} %>
</h2>
<div>
<% if(product.quantity > 0){%>
<p style="margin-right: 30px; margin-left: 0px;color: green;">