{% sw_extends '@Storefront/storefront/component/product/card/box-standard.html.twig' %}
{% block component_product_box %}
{% set sizes = {
'xs': '500px',
'sm': '315px',
'md': '390px',
'lg': '350px',
'xl': '280px'
} %}
{{ parent() }}
{% endblock %}
{% block component_product_box_content %}
{% set type = 'free' %}
{% if product.extensions.dvdwParticipations and product.extensions.dvdwParticipations.elements | length > 0 %}
{% set participation = product.extensions.dvdwParticipations | first %}
{% if participation and participation.orderLineItem and participation.orderLineItem.extensions.dvdwTicket %}
{% set type = participation.orderLineItem.extensions.dvdwTicket.type %}
{% endif %}
{% endif %}
<div class="card-body">
{% block component_product_box_badges %}
{{ parent() }}
{% if type === 'gold' %}
<div class="badge badge-gold">
<img src="/bundles/dvdwdirectory/images/product/badge-gold.svg" alt="golden badge" />
</div>
{% endif %}
{% endblock %}
{% block component_product_box_rich_snippets %}
{{ parent() }}
{% endblock %}
{% 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}) }}"
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: sizes
} %}
{% else %}
<div class="product-image-placeholder">
{% sw_icon 'placeholder-icon' style {
pack: 'custom-icons',
size: 'fluid'
} %}
</div>
{% endif %}
</a>
{% if config('core.cart.wishlistEnabled') %}
{% block component_product_box_wishlist_action %}
{% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
appearance: 'circle',
productId: id
} %}
{% endblock %}
{% endif %}
</div>
{% endblock %}
{% block component_product_box_info %}
<hr class="image-info-line">
<div class="product-info">
{% block component_product_box_rating %}
{% endblock %}
{% block component_product_box_name %}
<a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
class="product-name"
title="{{ name }}">
{{ name }}
</a>
{% endblock %}
{% block component_product_box_variant_characteristics %}
{% endblock %}
{% block component_product_box_description %}
<div class="product-description
{% if product.translated.description|length > 75 %} tooltip-target {% endif %}">
{{ product.translated.description|striptags|raw }}
{# {% if product.translated.description|length > 75 %}#}
{# <span class="tooltip-text">#}
{# {{ product.translated.description|striptags|raw }}#}
{# </span>#}
{# {% endif %}#}
</div>
{% endblock %}
{% block component_product_box_price %}
{% endblock %}
{% block component_product_box_action %}
{% sw_include '@DvdwDirectory/storefront/component/shops/card-actions.html.twig' %}
{% endblock %}
</div>
{% endblock %}
</div>
{% endblock %}