|
|
|
|
|
|
|
|
{% if value is defined and value is not null %} |
|
|
{% if value is defined and value is not null %} |
|
|
{% if item.getBehaviorPrice() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE") %} |
|
|
|
|
|
{{ value }} pièce{% if value > 1 %}s{% endif %} |
|
|
|
|
|
{% elseif item.getBehaviorPrice() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT") %} |
|
|
|
|
|
{{ value }} {{ item.getUnit().getUnit() }} |
|
|
|
|
|
|
|
|
{% if value > 0 %} |
|
|
|
|
|
{% set badge_class = 'badge-success' %} |
|
|
|
|
|
{% else %} |
|
|
|
|
|
{% set badge_class = 'badge-danger' %} |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
<span class="badge {{ badge_class }}"> |
|
|
|
|
|
{% if item.getBehaviorCountStock() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE") %} |
|
|
|
|
|
{{ value }} {{ item.getUnit().getUnit() }} |
|
|
|
|
|
{% elseif item.getBehaviorCountStock() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT_FAMILY") %} |
|
|
|
|
|
{{ value }} pièce{% if value > 1 %}s{% endif %} |
|
|
|
|
|
{% elseif item.getBehaviorCountStock() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT") %} |
|
|
|
|
|
{{ item.getAvailableQuantityInherited() }} pièce{% if value > 1 %}s{% endif %} (déclinaisons) |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
</span> |
|
|
|
|
|
{% else %} |
|
|
|
|
|
{% if item.getBehaviorCountStock() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_UNLIMITED") %} |
|
|
|
|
|
<span class="badge badge-success">Illimité</span> |
|
|
|
|
|
{% else %} |
|
|
|
|
|
<span class="badge badge-danger">Pas de stock</span> |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
{% endif %} |