2018-10-26 22:53:46 +02:00
|
|
|
{{define "content"}}
|
2018-10-27 12:56:16 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
function deleteitem(id) {
|
|
|
|
location.href = 'http://127.0.0.1:8000/removeFromCart?id=' + id;
|
|
|
|
}
|
|
|
|
</script>
|
2018-10-26 22:53:46 +02:00
|
|
|
<h1>Koszyk</h1>
|
|
|
|
<div class="cartItem">
|
|
|
|
<div class="cartItemColumn"><h3>Produkt</h3></div>
|
|
|
|
<div class="cartItemColumn"><h3>Cena za szt.</h3></div>
|
|
|
|
<div class="cartItemColumn"><h3>Ilość</h3></div>
|
|
|
|
<div class="cartItemColumn"><h3>Łącznie</h3></div>
|
2018-10-27 12:56:16 +02:00
|
|
|
<div class="cartItemColumn"></div>
|
2018-10-26 22:53:46 +02:00
|
|
|
</div>
|
|
|
|
{{range $.cart.Products}}
|
|
|
|
<div class="cartItem">
|
|
|
|
<div class="cartItemColumn">
|
|
|
|
<a href="http://127.0.0.1:8000/product?id={{ .Product.Id }}"><b>{{ .Product.Name }}</b>
|
|
|
|
<div class="cartItemIcon" style="background-image: url({{ .Product.ImgUrl }});"></div></a>
|
|
|
|
</div>
|
|
|
|
<div class="cartItemColumn">{{ .Product.Price }} zł</div>
|
|
|
|
<div class="cartItemColumn">{{ .Quantity }}</div>
|
|
|
|
<div class="cartItemColumn">{{ .PriceTotal }} zł</div>
|
2018-10-27 12:56:16 +02:00
|
|
|
<div class="cartItemColumn"><input type="button" value="Usuń" onclick="deleteitem({{ .Product.Id }});" style="background-color: red;"></div>
|
2018-10-26 22:53:46 +02:00
|
|
|
</div>
|
|
|
|
{{end}}
|
2018-10-27 15:45:05 +02:00
|
|
|
<div style="float: right; margin-right: 5%; margin-top:20px; text-align: right;">Wartość koszyka: {{ .cart.PriceTotal }} zł<br><a href="/checkout"><input type="button" value="Podsumowanie"></a></div>
|
2018-10-26 22:53:46 +02:00
|
|
|
{{end}}
|