2018-10-26 17:53:00 +02:00
|
|
|
{{define "content"}}
|
2018-10-26 22:53:46 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
function buy() {
|
|
|
|
location.href = 'http://127.0.0.1:8000/addToCart?id=' + {{.product.Id}} + '&quantity=' + document.getElementById("quantity").value;
|
|
|
|
}
|
|
|
|
</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-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>
|
|
|
|
<div class="productPrice">Cena: {{.product.Price}} zł</div><br>
|
2018-10-26 22:53:46 +02:00
|
|
|
<input type="button" value="Dodaj do koszyka" onclick="buy();">
|
2018-10-26 17:53:00 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|