Add stock to product.
This commit was merged in pull request #50.
This commit is contained in:
@@ -23,8 +23,8 @@
|
|||||||
<td class="align-middle" style="width: 120px;"><img src='{{ product.image }}&width=70' class='img-thumbnail' alt='{{ product.name }}'/></td>
|
<td class="align-middle" style="width: 120px;"><img src='{{ product.image }}&width=70' class='img-thumbnail' alt='{{ product.name }}'/></td>
|
||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
<a href='{{ path('app_product', {'productId': product.id}) }}' class="text-decoration-none">{{ product.name }}</a>
|
<a href='{{ path('app_product', {'productId': product.id}) }}' class="text-decoration-none">{{ product.name }}</a>
|
||||||
{% if product.currentStock.stock > 0 %}
|
{% if product.stock > 0 %}
|
||||||
<span class="badge text-bg-light">stock: {{ product.currentStock.stock }}</span>
|
<span class="badge text-bg-light">stock: {{ product.stock }}</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="badge text-bg-warning">out of stock</span>
|
<span class="badge text-bg-warning">out of stock</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user