{% sw_extends '@Storefront/storefront/component/product/card/box-standard.html.twig' %}
{# like minimal adjusted box for starting page product slider but few adjustments #}
{# add clerk tracking if search page and if clerk plugin is enabled #}
{% block component_product_box %}
{% if product %}
{% set name = product.translated.name %}
{% set id = product.id %}
{% set cover = product.cover.media %}
{% set variation = product.variation %}
<div class="card product-box box-{{ layout }}"{% if config('Clerkio.config.enabled') and isSearchPage %} data-clerk-product-id="{{product.id|upper}}"{% endif %}>
{% block component_product_box_content %}
{{ parent() }}
{% endblock %}
</div>
{% endif %}
{% endblock %}
{% block component_product_box_image %}
{% set shortDescription = product.translated.customFields.grimm_customFields_short_desc %}
{% if product.mkxBVParent %}
{% set name = product.mkxBVParent.translated.name %}
{% set shortDescription = product.mkxBVParent.translated.customFields.grimm_customFields_short_desc %}
{% set cover = product.mkxBVParent.cover.media %}
{% endif %}
<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}) }}"
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>
{% if config('core.cart.wishlistEnabled') %}
{% block component_product_box_wishlist_action %}
{% endblock %}
{% endif %}
</div>
<div class="product-name-number__container">
<a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
class="product-name"
title="{{ name }}">
{{ name }}
</a>
{# not shown on starting page slider product box #}
{% if product.translated.customFields.grimm_customFields_short_desc and activeRoute != "frontend.home.page" and activeRoute != "frontend.detail.page" %}
<a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
class="product-info__gallery-description">
{{ shortDescription }}
{% sw_include '@Storefront/storefront/component/product/price-unit-info.html.twig' with { 'product': product } %}
</a>
{% endif %}
</div>
{% endblock %}
{% block component_product_box_info %}
<div class="product-info">
{% block component_product_box_rating %}{% endblock %}
{% block component_product_box_name %}{% endblock %}
{% block component_product_box_variant_characteristics %}{% endblock %}
{% block component_product_box_description %}{% endblock %}
{% block component_product_additional_info %}
<div class="product_additional_info">
<div class="d-flex align-items-end">
{% sw_include '@Storefront/storefront/component/product/card/price-uvp.html.twig' %}
{% sw_include '@Storefront/storefront/component/product/card/price-discount-amount.html.twig' %}
</div>
</div>
{% endblock %}
{% block component_product_box_price %}
<div class="price-container">
{# SD:4986 #}
{% set requestOnly = product.translated.customFields.grimm_customfields_productRequest_only %}
{% if requestOnly %}
{% set showUVP = product.translated.customFields.grimm_customfields_productRequest_showUVP %}
{% if showUVP %}
{% sw_include '@Storefront/solution360/grimm/product/request-only-uvp-display.html.twig' with {productListing: true} %}
{% else %}
<span class="product-price mt-0" style="height: 28px">{{ "product.price.priceUponRequest"|trans|sw_sanitize }}</span>
{% endif %}
{% else %}
{{ parent() }}
{# {% block component_product_box_action %}{% endblock %} #}
{% sw_include '@Storefront/storefront/component/product/card/action.html.twig' %}
{% endif %}
</div>
{% endblock %}
{# include changed button because buy action only on list view #}
{# this template will also include the merkliste heart if plugin activated #}
{# {% sw_include '@Storefront/storefront/component/product/card/action.html.twig' %} #}
</div>
{% endblock %}