18th Commit

This commit is contained in:
Aritra Banik 2024-02-07 04:27:30 +05:30
parent eb1a272d96
commit c2ef8d11be
3 changed files with 22 additions and 1 deletions

Binary file not shown.

BIN
src/a3

Binary file not shown.

View File

@ -179,7 +179,9 @@
<h3 class="text-black h4 text-uppercase">Cart Totals</h3>
</div>
</div>
<div class="row mb-3">
{% var total = 0.0 %}
{% for (id, product) in products.pairs() %}
{# <div class="row mb-3">
<div class="col-md-6">
<span class="text-black">Subtotal</span>
</div>
@ -194,6 +196,25 @@
<div class="col-md-6 text-right">
<strong class="text-black">$230.00</strong>
</div>
</div> #}
<div class="row mb-3">
<div class="col-md-6">
<span class="text-black">{{product.name}}</span>
</div>
<div class="col-md-6 text-right">
<strong class="text-black">₹{{toFloat(cart[id].quantity)*product.price}}</strong>
</div>
</div>
{% total = total + toFloat(cart[id].quantity)*product.price %}
{% endfor %}
<div class="row mb-5">
<div class="col-md-6">
<span class="text-black">Total</span>
</div>
<div class="col-md-6 text-right">
<strong class="text-black">₹{{total}}</strong>
</div>
</div>
<div class="row">