custom/plugins/econdCrossSelll/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_image %}
  3.     <div class="product-image-wrapper">
  4.         {# fallback if display mode is not set #}
  5.         {% set displayMode = displayMode ?: 'standard' %}
  6.         {# set display mode 'cover' for box-image with standard display mode #}
  7.         {% if layout == 'image' and displayMode == 'standard' %}
  8.             {% set displayMode = 'cover' %}
  9.         {% endif %}
  10.         <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}{{ emcsParams[product.id] }}"
  11.            title="{{ name }}"
  12.            class="product-image-link is-{{ displayMode }}">
  13.             {% if cover.url %}
  14.                 {% set attributes = {
  15.                     'class': 'product-image is-'~displayMode,
  16.                     'alt': (cover.translated.alt ?: name),
  17.                     'title': (cover.translated.title ?: name)
  18.                 } %}
  19.                 {% if displayMode == 'cover' or displayMode == 'contain' %}
  20.                     {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  21.                 {% endif %}
  22.                 {% sw_thumbnails 'product-image-thumbnails' with {
  23.                     media: cover,
  24.                     sizes: {
  25.                         'xs': '501px',
  26.                         'sm': '315px',
  27.                         'md': '427px',
  28.                         'lg': '333px',
  29.                         'xl': '284px'
  30.                     }
  31.                 } %}
  32.             {% else %}
  33.                 <div class="product-image-placeholder">
  34.                     {% sw_icon 'placeholder' style {
  35.                         'size': 'fluid'
  36.                     } %}
  37.                 </div>
  38.             {% endif %}
  39.         </a>
  40.     </div>
  41. {% endblock %}
  42. {% block component_product_box_name %}
  43.     <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}{{ emcsParams[product.id] }}"
  44.        class="product-name"
  45.        title="{{ name }}">
  46.         {{ name }}
  47.     </a>
  48. {% endblock %}
  49. {% block component_product_box_variant_characteristics %}
  50.     {% if product.variation %}
  51.         <div class="product-variant-characteristics">
  52.             <div class="product-variant-characteristics-text">
  53.                 {% if not displayParent %}
  54.                     {% for variation in product.variation %}
  55.                         {{ variation.group }}:
  56.                         <span class="product-variant-characteristics-option">
  57.                         {{ variation.option }}
  58.                     </span>
  59.                         {% if product.variation|last != variation %}
  60.                             {{ " | " }}
  61.                         {% endif %}
  62.                     {% endfor %}
  63.                 {% endif %}
  64.             </div>
  65.         </div>
  66.     {% endif %}
  67. {% endblock %}