25 lines
1.0 KiB
HTML
25 lines
1.0 KiB
HTML
{{define "content"}}
|
|
<script type="text/javascript">
|
|
function buy() {
|
|
location.href = 'http://127.0.0.1:8000/addToCart?id=' + {{.product.Id}} + '&quantity=' + document.getElementById("quantity").value;
|
|
}
|
|
</script>
|
|
<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>
|
|
<div class="productPrice">Ilość sztuk: <input id="quantity" type="number" name="quantity" min="1" max="{{.product.Quantity}}" value="1"></div>
|
|
<small>Dostępna Ilość: {{.product.Quantity}}</small><br><br>
|
|
<div class="productPrice">Cena: {{.product.Price}} zł</div><br>
|
|
<input type="button" value="Dodaj do koszyka" onclick="buy();">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|