custom/plugins/ProcWegmannTheme/src/Resources/views/storefront/component/product/card/box-standard.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.   {% if product %}
  4.     {% set name = product.translated.name %}
  5.     {% set id = product.id %}
  6.     {% set cover = product.cover.media %}
  7.     {% set variation = product.variation %}
  8.     <div class="card product-box box-{{ layout }}">
  9.       {% block component_product_box_content %}
  10.         <div class="card-body">
  11.           {% block component_product_box_badges %}
  12.             {% sw_include '@Storefront/storefront/component/product/card/badges.html.twig' %}
  13.           {% endblock %}
  14.           {% block component_product_box_rich_snippets %}
  15.             {# @deprecated tag:v6.5.0 - Block will be removed completely including the template it references #}
  16.             {% sw_include '@Storefront/storefront/component/product/card/meta.html.twig' %}
  17.           {% endblock %}
  18.           {% block component_product_box_image %}
  19.               <div class="product-image-wrapper">
  20.                   {# fallback if display mode is not set #}
  21.                   {% set displayMode = displayMode ?: 'standard' %}
  22.                   {# set display mode 'cover' for box-image with standard display mode #}
  23.                   {% if layout == 'image' and displayMode == 'standard' %}
  24.                       {% set displayMode = 'cover' %}
  25.                   {% endif %}
  26.                   <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  27.                      title="{{ name }}"
  28.                      class="product-image-link is-{{ displayMode }}">
  29.                       {% if cover.url %}
  30.                           {% set attributes = {
  31.                               'class': 'product-image is-'~displayMode,
  32.                               'alt': (cover.translated.alt ?: name),
  33.                               'title': (cover.translated.title ?: name)
  34.                           } %}
  35.                           {% if displayMode == 'cover' or displayMode == 'contain' %}
  36.                               {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  37.                           {% endif %}
  38.                           {% sw_thumbnails 'product-image-thumbnails' with {
  39.                               media: cover,
  40.                               sizes: sizes
  41.                           } %}
  42.                       {% else %}
  43.                           <div class="product-image-placeholder">
  44.                               {% set name = 'wa-placeholder-white_' ~ app.request.locale %}
  45.                               {% sw_include "@Storefront/storefront/utilities/icon.html.twig" with {
  46.                                   'name': name,
  47.                                   'size': 'fluid',
  48.                                   'pack': 'custom-icons',
  49.                                   'color': 'inherit'
  50.                               } %}
  51.                           </div>
  52.                       {% endif %}
  53.                   </a>
  54.                   {% if config('core.cart.wishlistEnabled') %}
  55.                       {% block component_product_box_wishlist_action %}
  56.                          {{ parent() }}
  57.                       {% endblock %}
  58.                   {% endif %}
  59.               </div>
  60.           {% endblock %}
  61.           {% block component_product_box_info %}
  62.             <div class="product-info">
  63.               {% block component_product_box_rating %}
  64.                 {% if config('core.listing.showReview') %}
  65.                   <div class="product-rating">
  66.                     {% if product.ratingAverage %}
  67.                       {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  68.                         points: product.ratingAverage,
  69.                         style: 'text-primary'
  70.                       } %}
  71.                     {% endif %}
  72.                   </div>
  73.                 {% endif %}
  74.               {% endblock %}
  75.               {% block component_product_box_name %}
  76.                 <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  77.                    class="product-name"
  78.                    title="{{ name }}">
  79.                   {{ name }}
  80.                 </a>
  81.               {% endblock %}
  82.               {% block component_product_box_variant_characteristics %}
  83.                 <div class="product-number">
  84.                   <span>{{ 'detail.productNumberLabel'|trans|sw_sanitize }} {{ product.productNumber }}</span>
  85.                 </div>
  86.                 <div class="product-variant-characteristics">
  87.                   <div class="product-variant-characteristics-text">
  88.                     {% for variation in product.variation %}
  89.                       {{ variation.group }}:
  90.                       <span class="product-variant-characteristics-option">
  91.                                                 {{ variation.option }}
  92.                                             </span>
  93.                       {% if product.variation|last != variation %}
  94.                         {{ " | " }}
  95.                       {% endif %}
  96.                     {% endfor %}
  97.                   </div>
  98.                 </div>
  99.               {% endblock %}
  100.               {% block component_product_box_description %}
  101.                 <div class="product-description">
  102.                   {{ product.translated.description|striptags|raw }}
  103.                 </div>
  104.               {% endblock %}
  105.               {% block component_product_box_price %}
  106.                 {% sw_include '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
  107.               {% endblock %}
  108.               {% block component_product_box_action %}
  109.                 {% sw_include '@Storefront/storefront/component/product/card/action.html.twig' %}
  110.               {% endblock %}
  111.             </div>
  112.           {% endblock %}
  113.         </div>
  114.       {% endblock %}
  115.     </div>
  116.   {% endif %}
  117. {% endblock %}