{% sw_extends '@Storefront/storefront/component/product/card/box-standard.html.twig' %}
{% block component_product_box_image %}
<div class="product-image-wrapper">
{# fallback if display mode is not set #}
{% set displayMode = displayMode ?: 'standard' %}
{# set display mode 'cover' for box-image with standard display mode #}
{% if layout == 'image' and displayMode == 'standard' %}
{% set displayMode = 'cover' %}
{% endif %}
<a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}{{ emcsParams[product.id] }}"
title="{{ name }}"
class="product-image-link is-{{ displayMode }}">
{% if cover.url %}
{% set attributes = {
'class': 'product-image is-'~displayMode,
'alt': (cover.translated.alt ?: name),
'title': (cover.translated.title ?: name)
} %}
{% if displayMode == 'cover' or displayMode == 'contain' %}
{% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
{% endif %}
{% sw_thumbnails 'product-image-thumbnails' with {
media: cover,
sizes: {
'xs': '501px',
'sm': '315px',
'md': '427px',
'lg': '333px',
'xl': '284px'
}
} %}
{% else %}
<div class="product-image-placeholder">
{% sw_icon 'placeholder' style {
'size': 'fluid'
} %}
</div>
{% endif %}
</a>
</div>
{% endblock %}
{% block component_product_box_name %}
<a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}{{ emcsParams[product.id] }}"
class="product-name"
title="{{ name }}">
{{ name }}
</a>
{% endblock %}
{% block component_product_box_variant_characteristics %}
{% if product.variation %}
<div class="product-variant-characteristics">
<div class="product-variant-characteristics-text">
{% if not displayParent %}
{% for variation in product.variation %}
{{ variation.group }}:
<span class="product-variant-characteristics-option">
{{ variation.option }}
</span>
{% if product.variation|last != variation %}
{{ " | " }}
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}