fonc(stock) implémente gestion basique du stock

This commit is contained in:
gcch 2025-12-13 17:37:47 +01:00
commit 8c71a69c1b
5 changed files with 35 additions and 19 deletions

View file

@ -107,13 +107,24 @@
</div>
<div class="details-produit__actions">
<button
class="bouton-case-pleine"
{{ variations_produit|length > 1 ? 'disabled' : '' }}
id="bouton-ajout-panier"
type="button"
>
Add to cart
</button>
{% if produit.stock > 0 %}
<button
class="bouton-case-pleine"
{{ variations_produit|length > 1 ? 'disabled' : '' }}
id="bouton-ajout-panier"
type="button"
>
Add to cart
</button>
{% else %}
<button
class="bouton-case-pleine"
disabled
id="bouton-ajout-panier"
type="button"
>
Out of stock
</button>
{% endif %}
</div>
</aside>