2018-10-26 17:53:00 +02:00
|
|
|
{{define "content"}}
|
2018-10-26 22:53:46 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
function buy() {
|
2018-10-27 17:30:25 +02:00
|
|
|
location.href = '/addToCart?id=' + {{.product.Id}} + '&quantity=' + document.getElementById("quantity").value;
|
2018-10-26 22:53:46 +02:00
|
|
|
}
|
|
|
|
</script>
|
2018-10-26 17:53:00 +02:00
|
|
|
<div class="productDescription">
|
|
|
|
<div class="productDescriptionColumn">
|
|
|
|
<div class="productDescriptionContent">
|
|
|
|
<h1>{{.product.Name}}</h1>
|
|
|
|
<div class="productDescriptionIcon" style="background-image: url({{ .product.ImgUrl }});"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="productDescriptionColumn">
|
|
|
|
<div class="productDescriptionText">
|
|
|
|
{{.product.Description}}<br><br>
|
2018-10-27 12:56:16 +02:00
|
|
|
{{if gt .product.Quantity 0}}
|
2018-10-26 22:53:46 +02:00
|
|
|
<div class="productPrice">Ilość sztuk: <input id="quantity" type="number" name="quantity" min="1" max="{{.product.Quantity}}" value="1"></div>
|
2018-10-26 17:53:00 +02:00
|
|
|
<small>Dostępna Ilość: {{.product.Quantity}}</small><br><br>
|
2018-10-27 12:56:16 +02:00
|
|
|
{{end}}
|
2018-10-26 17:53:00 +02:00
|
|
|
<div class="productPrice">Cena: {{.product.Price}} zł</div><br>
|
2018-10-27 12:56:16 +02:00
|
|
|
{{if gt .product.Quantity 0}}
|
2018-10-26 22:53:46 +02:00
|
|
|
<input type="button" value="Dodaj do koszyka" onclick="buy();">
|
2018-10-27 12:56:16 +02:00
|
|
|
{{else}}
|
|
|
|
<div class="productUnavailable">Produkt niedostępny</div>
|
|
|
|
{{end}}
|
2018-10-26 17:53:00 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|