{% sw_extends '@Storefront/storefront/component/product/card/box-standard.html.twig' %}
{% block component_product_box_info %}
<div class="product-info">
{% block component_product_box_rating %}
{% endblock %}
{% block component_product_box_ordernumber %}
<p class="product-ordernumber">
<span class="product-ordernumber-label">{{ "listing.ordernumberLabel"|trans|sw_sanitize }}</span>
<span class="product-ordernumber-value">{{ product.productNumber }}</span>
</p>
{% endblock %}
{% block component_product_box_name %}
{{ parent() }}
{% endblock %}
{% block component_product_box_variant_characteristics %}
<div class="product-variant-characteristics">
{% for variation in product.variation|filter(variation => variation.group is not same as('fallback_model'))|slice(0, 4) %}
<div class="product-variant-characteristics-item">
<span class="product-variant-characteristics-label">{{ variation.group }}:</span>
<span class="product-variant-characteristics-value">{{ variation.option }}</span>
</div>
{% endfor %}
</div>
{% endblock %}
{% block component_product_box_description %}{% endblock %}
{% block component_product_box_delivery %}
{% if context.customer is not null %}
{% set stockInfo = decodeStockInfo(product, context) %}
<div class="product-detail-delivery-information">
{% if stockInfo and stockInfo.stock is defined %}
<div class="product-detail-delivery-information-stock">
{% if stockInfo.stock > 0 %}
<span class="delivery-status-indicator bg-success"></span>
{% elseif stockInfo.restock is not empty or stockInfo.reorder %}
<span class="delivery-status-indicator bg-warning"></span>
{% else %}
<span class="delivery-status-indicator bg-danger"></span>
{% endif %}
{% if stockInfo.stock > 0 %}
{% if stockInfo.stock > 1000 %}
{{ "listing.inStock"|trans({'%stock%': '1000+'})|sw_sanitize }}
{% else %}
{{ "listing.inStock"|trans({'%stock%': stockInfo.stock})|sw_sanitize }}
{% endif %}
{% else %}
{{ "listing.noStock"|trans|sw_sanitize }}
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
{% endblock %}
{% block component_product_box_price %}
{% set hidePrice = not context.customer or context.salesChannel.customFields.custom_fields_sales_channel_hide_prices_listing %}
{% if not hidePrice %}
{% sw_include '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
{% endif %}
{% endblock %}
{% block component_product_box_action %}
{{ parent() }}
{% endblock %}
</div>
{% endblock %}