#6 Updated Product views to better show information

This commit is contained in:
2024-01-28 00:26:17 +00:00
parent 595069772c
commit d80b07d43d
3 changed files with 112 additions and 41 deletions

View File

@ -3,7 +3,7 @@
<div class="product-fs">
{% if product != None %}
{% if user.id == product.sellerID%}
{% if user.id == product.sellerID %}
<form class="input-form" method="POST" action="/products/update/{{product.id}}" enctype="multipart/form-data">
<div class="product-title">
<input type="text" id="name" name="name" placeholder="Product Name" value="{{product.name}}" required>
@ -41,17 +41,25 @@
</form>
<div class="product-add-to-cart"></div>
{% else %}
<div class="product-title">{{product.name}}</div>
<div class="product-information">
<div class="product-image">
<img src="{{url_for('static', filename='assets/img/products/' + product.image)}}" alt="Brake Disks" height="auto" width="150px" />
</div>
<div class="product-details">
<div class="product-price">£{{product.cost}}</div>
<div class="product-description">{{product.description}}</div>
<img class="product-image" src="{{url_for('static', filename='assets/img/products/' + product.image)}}" alt="Brake Disks"/>
<div class="product-details">
<div class="product-title">{{product.name}}</div>
<div class="product-description">{{product.description}}</div>
</div>
<div class="product-acquisition-pane">
<div class="product-price">£{{product.cost}}</div>
<div class="product-delivery">Earliest Delivery Friday 24th December</div>
<div class="product-postage">+£{{product.cost}} P&P</div>
<div class="product-stock">
{% if product.quantityAvailable > 0 %}
<div class="product-instock">In Stock</div>
<div class="product-quantity">{{product.quantityAvailable}} Available</div>
<input type="submit" class="product-add-to-cart" value="Add to Cart" />
{% else %}
<div class="product-nostock">Out of Stock</div>
{% endif %}
</div>
</div>
<div class="product-add-to-cart"></div>
{% endif %}
{% endif %}
</div>