custom/plugins/GrimmTheme/src/Resources/views/solution360/listingviewswitch/product-list.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 shortDescription = product.translated.customFields.grimm_customFields_short_desc %}
  8.         {% set variation = product.variation %}
  9.         
  10.         {% if product.mkxBVParent %}
  11.             {% set name = product.mkxBVParent.translated.name %}
  12.             {% set cover = product.mkxBVParent.cover.media %}
  13.             {% set shortDescription = product.mkxBVParent.translated.customFields.grimm_customFields_short_desc %}
  14.         {% endif %}
  15.         <div class="card list-box product-box">
  16.             {% block component_product_box_content %}
  17.                 <div class="list-body col-12">
  18.                     {% block component_product_box_badges %}
  19.                         {{ parent() }}
  20.                     {% endblock %}
  21.                     {% block component_product_box_rich_snippets %}
  22.                         {{ parent() }}
  23.                     {% endblock %}
  24.                     {% block component_product_box_image %}
  25.                         <div
  26.                             class="product-image-wrapper col-3">
  27.                             {# fallback if display mode is not set #}
  28.                             {% set displayMode = displayMode ?: 'standard' %}
  29.                             {# set display mode 'cover' for box-image with standard display mode #}
  30.                             {% if layout == 'image' and displayMode == 'standard' %}
  31.                                 {% set displayMode = 'cover' %}
  32.                             {% endif %}
  33.                             <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}" title="{{ name }}" class="product-image-link is-{{ displayMode }}">
  34.                                 {% if cover.url %}
  35.                                     {% set attributes = {
  36.                                         'class': 'product-image is-'~displayMode,
  37.                                         'alt': (cover.translated.alt ?: name),
  38.                                         'title': (cover.translated.title ?: name),
  39.                                         'loading': 'lazy'
  40.                                     } %}
  41.                                     {% if displayMode == 'cover' or displayMode == 'contain' %}
  42.                                         {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  43.                                     {% endif %}
  44.                                     {% sw_thumbnails 'product-image-thumbnails' with {
  45.                                         media: cover,
  46.                                         sizes: {
  47.                                             'xs': '501px',
  48.                                             'sm': '315px',
  49.                                             'md': '427px',
  50.                                             'lg': '333px',
  51.                                             'xl': '284px'
  52.                                         }
  53.                                     } %}
  54.                                 {% else %}
  55.                                     <div class="product-image-placeholder">
  56.                                         {% sw_icon 'placeholder' style {
  57.                                             'size': 'fluid'
  58.                                         } %}
  59.                                     </div>
  60.                                 {% endif %}
  61.                             </a>
  62.                             {% if config("core.cart.wishlistEnabled") %}
  63.                                 {% block component_product_box_wishlist_action %}
  64.                                     {{ parent() }}
  65.                                 {% endblock %}
  66.                             {% endif %}
  67.                         </div>
  68.                     {% endblock %}
  69.                     {% block component_product_box_info %}
  70.                         <div class="product-info">
  71.                             {% block component_product_box_name %}
  72.                                 <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  73.                                    class="product-name"
  74.                                    title="{{ name }}">
  75.                                     {{ name }}
  76.                                 </a>
  77.                             {% endblock %}
  78.                             {% if "product.articleNumber" and product.productNumber %}
  79.                                 <p class="product-info__article-number">
  80.                                     {{ "product.articleNumber"|trans|sw_sanitize }}
  81.                                     {{ product.productNumber }}
  82.                                 </p>
  83.                             {% endif %}
  84.                             {% block component_product_box_rating %}{% endblock %}
  85.                             {% block component_product_box_variant_characteristics %}{% endblock %}
  86.                             {% if product.translated.customFields.grimm_customFields_short_desc %}
  87.                             <p class="product-info__description">
  88.                                 {{ shortDescription }}
  89.                             </p>
  90.                             {% endif %}
  91.                             {% block component_product_box_description %}{% endblock %}
  92.                         </div>
  93.                     {% endblock %}
  94.                     {% block component_product_box_last_section %}
  95.                         <div class="product-last-section">
  96.                             {% block component_product_box_price %}
  97.                             <div class="product_additional_info">
  98.                                 {% sw_include '@Storefront/storefront/component/product/card/price-uvp.html.twig' %}
  99.                                 {% sw_include '@Storefront/storefront/component/product/card/price-discount-amount.html.twig' %}
  100.                             </div>
  101.                                 <div class="product-last-section__price-taxes">
  102.                                     {% set requestOnly = product.translated.customFields.grimm_customfields_productRequest_only %}
  103.                                     {% if requestOnly %}
  104.                                         {% set showUVP = product.translated.customFields.grimm_customfields_productRequest_showUVP %}
  105.                                         {% if showUVP %}
  106.                                             {% sw_include '@Storefront/solution360/grimm/product/request-only-uvp-display.html.twig' with {productListing: true} %}
  107.                                         {% else %}
  108.                                             <div class="product-price" style="height: 28px">
  109.                                                 {{ "product.price.priceUponRequest"|trans|sw_sanitize }}
  110.                                             </div>
  111.                                         {% endif %}
  112.                                 </div>
  113.                                     {% else %}
  114.                                         {% sw_include '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
  115.                                         {% sw_include '@Storefront/storefront/component/product/card/price-taxes.html.twig' %}
  116.                                 </div>
  117.                                     {% sw_include '@Storefront/storefront/component/product/price-unit-info.html.twig' with { 'product': product } %}
  118.                                     {% endif %}
  119.                             {% endblock %}
  120.                             <div class="d-flex align-items-end">
  121.                             {# delivery time #}
  122.                                 {% sw_include '@Storefront/storefront/component/product/card/product-delivery-info.html.twig' %}
  123.                             </div>
  124.                             {% block component_product_box_action %}
  125.                                 {% sw_include '@Storefront/storefront/component/product/card/action-list-view.html.twig' %}
  126.                             {% endblock %}
  127.                         </div>
  128.                     {% endblock %}
  129.                 </div>
  130.             {% endblock %}
  131.         </div>
  132.     {% endif %}
  133. {% endblock %}