vendor/dvdw/directory/src/Resources/views/storefront/component/shops/webshop.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/card/box-standard.html.twig' %}
  2. {% block component_product_box %}
  3.     {% set sizes = {
  4.         'xs': '500px',
  5.         'sm': '315px',
  6.         'md': '390px',
  7.         'lg': '350px',
  8.         'xl': '280px'
  9.     } %}
  10.     {{ parent() }}
  11. {% endblock %}
  12. {% block component_product_box_content %}
  13.     {% set type = 'free' %}
  14.     {% if product.extensions.dvdwParticipations and product.extensions.dvdwParticipations.elements | length > 0 %}
  15.         {% set participation = product.extensions.dvdwParticipations | first %}
  16.         {% if participation and participation.orderLineItem and participation.orderLineItem.extensions.dvdwTicket %}
  17.             {% set type = participation.orderLineItem.extensions.dvdwTicket.type %}
  18.         {% endif %}
  19.     {% endif %}
  20.     <div class="card-body">
  21.         {% block component_product_box_badges %}
  22.             {{ parent() }}
  23.             {% if type === 'gold' %}
  24.                 <div class="badge badge-gold">
  25.                     <img src="/bundles/dvdwdirectory/images/product/badge-gold.svg" alt="golden badge" />
  26.                 </div>
  27.             {% endif %}
  28.         {% endblock %}
  29.         {% block component_product_box_rich_snippets %}
  30.             {{ parent() }}
  31.         {% endblock %}
  32.         {% block component_product_box_image %}
  33.             <div class="product-image-wrapper">
  34.                 {# fallback if display mode is not set #}
  35.                 {% set displayMode = displayMode ?: 'standard' %}
  36.                 {# set display mode 'cover' for box-image with standard display mode #}
  37.                 {% if layout == 'image' and displayMode == 'standard' %}
  38.                     {% set displayMode = 'cover' %}
  39.                 {% endif %}
  40.                 <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  41.                    title="{{ name }}"
  42.                    class="product-image-link is-{{ displayMode }}">
  43.                     {% if cover.url %}
  44.                         {% set attributes = {
  45.                             'class': 'product-image is-'~displayMode,
  46.                             'alt': (cover.translated.alt ?: name),
  47.                             'title': (cover.translated.title ?: name)
  48.                         } %}
  49.                         {% if displayMode == 'cover' or displayMode == 'contain' %}
  50.                             {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  51.                         {% endif %}
  52.                         {% sw_thumbnails 'product-image-thumbnails' with {
  53.                             media: cover,
  54.                             sizes: sizes
  55.                         } %}
  56.                     {% else %}
  57.                         <div class="product-image-placeholder">
  58.                             {% sw_icon 'placeholder-icon' style {
  59.                                 pack: 'custom-icons',
  60.                                 size: 'fluid'
  61.                             } %}
  62.                         </div>
  63.                     {% endif %}
  64.                 </a>
  65.                 {% if config('core.cart.wishlistEnabled') %}
  66.                     {% block component_product_box_wishlist_action %}
  67.                         {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  68.                             appearance: 'circle',
  69.                             productId: id
  70.                         } %}
  71.                     {% endblock %}
  72.                 {% endif %}
  73.             </div>
  74.         {% endblock %}
  75.         {% block component_product_box_info %}
  76.             <hr class="image-info-line">
  77.             <div class="product-info">
  78.                 {% block component_product_box_rating %}
  79.                 {% endblock %}
  80.                 {% block component_product_box_name %}
  81.                     <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  82.                        class="product-name"
  83.                        title="{{ name }}">
  84.                         {{ name }}
  85.                     </a>
  86.                 {% endblock %}
  87.                 {% block component_product_box_variant_characteristics %}
  88.                 {% endblock %}
  89.                 {% block component_product_box_description %}
  90.                     <div class="product-description
  91.                         {% if product.translated.description|length > 75 %} tooltip-target {% endif %}">
  92.                         {{ product.translated.description|striptags|raw }}
  93. {#                        {% if product.translated.description|length > 75 %}#}
  94. {#                            <span class="tooltip-text">#}
  95. {#                            {{ product.translated.description|striptags|raw }}#}
  96. {#                            </span>#}
  97. {#                        {% endif %}#}
  98.                     </div>
  99.                 {% endblock %}
  100.                 {% block component_product_box_price %}
  101.                 {% endblock %}
  102.                 {% block component_product_box_action %}
  103.                     {% sw_include '@DvdwDirectory/storefront/component/shops/card-actions.html.twig' %}
  104.                 {% endblock %}
  105.             </div>
  106.         {% endblock %}
  107.     </div>
  108. {% endblock %}