binaryjuan

juan
mail@pastecode.io avatar
unknown
ejs
2 years ago
836 B
2
Indexable
        <% if (carts.length == 0) { %>
            No products added to cart/s
        <% } else { %>
            <div class="dFlexCol">
                <% carts.forEach(prod => { %>
                    <div class="mt20 mb20">
                        <div>
                            <div><img src=<%= prod.img %> style="width:150px;" alt="product" /></div>
                            <div class="title"><%= prod.title %></div>
                            <div class="price">$<%= prod.price %> USD</div>
                            <button onClick=<%=`deleteCartProduct(${prod.id})`%> class="cartButtonDel" >Delete</button>
                        </div>
                    </div>
                <% }) %>
            </div>
            <button onClick=<%="deleteCart()"%> class="cartButtonDelAll">Delete all</button>
        <% } %>