custom/plugins/Tuerschild_2/src/Resources/views/storefront/component/product/card/box-standard.html.twig line 1

Open in your IDE?
  1. {% extends "@Storefront/storefront/component/product/card/box-standard.html.twig" %}
  2. {% block component_product_box_description %}
  3. {% endblock %}
  4. {% block component_product_box_badges %}
  5.     {% sw_include '@Storefront/storefront/component/product/card/badges.html.twig' %}
  6.     {% if config('core.cart.wishlistEnabled') %}
  7.         {% block component_product_box_wishlist_action_custom %}
  8.             {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  9.                 appearance: 'circle',
  10.                 productId: id
  11.             } %}
  12.         {% endblock %}
  13.     {% endif %}
  14. {% endblock %}
  15.  {% block component_product_box_price %}
  16.  {% endblock %}
  17. {% block component_product_box_variant_characteristics %}
  18. {% endblock %}
  19. {% block component_product_box_action %}
  20.     {% set isListPrice = product.calculatedPrice.listPrice.percentage > 0 %}
  21.     {% set listPrice = product.calculatedPrice.listPrice.price %}
  22.     <div class="flex-grow-1"></div>
  23.     <span class="list-price-line-through">
  24.     {% if isListPrice %}
  25.         {{ "listing.strikePriceText"|trans|sw_sanitize }}          {{ listPrice|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  26.     {% endif %}
  27.     </span>
  28.     <div class="product-action-wrapper  {% if isListPrice and not displayFrom %} with-list-price{% endif %}">
  29.         {% block component_product_box_price_custom %}
  30.             <div class="product-price-wrapper">
  31.                 {% sw_include '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
  32.             </div>
  33.         {% endblock %}
  34.         {% sw_include '@Storefront/storefront/component/product/card/action.html.twig' %}
  35.     </div>
  36. {% endblock %}
  37. {% block component_product_box_rating %}
  38. {% endblock %}
  39. {% block component_product_box_image %}
  40.     <div class="product-image-wrapper">
  41.         {# fallback if display mode is not set #}
  42.         {% set displayMode = displayMode ?: 'standard' %}
  43.         {# set display mode 'cover' for box-image with standard display mode #}
  44.         {% if layout == 'image' and displayMode == 'standard' %}
  45.             {% set displayMode = 'cover' %}
  46.         {% endif %}
  47.         <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  48.            title="{{ name }}"
  49.            class="position-relative product-image-link is-{{ displayMode }}">
  50.             {% if cover.url %}
  51.                 {% set attributes = {
  52.                     'class': 'product-image is-'~displayMode,
  53.                     'alt': (cover.translated.alt ?: name),
  54.                     'title': (cover.translated.title ?: name)
  55.                 } %}
  56.                 {% if displayMode == 'cover' or displayMode == 'contain' %}
  57.                     {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  58.                 {% endif %}
  59.                 {% set secondCoverId = product.customFields.custom_second_product_cover_image %}
  60.                 {% if secondCoverId %}
  61.                     {% set media = searchMedia([secondCoverId], context.context) %}
  62.                     {% set secondCover = media.get(product.customFields.custom_second_product_cover_image) %}
  63.                 {% endif %}
  64.                 {% if secondCover %}
  65.                     {% sw_thumbnails 'product-image-thumbnails' with {
  66.                         media: secondCover,
  67.                         sizes: {
  68.                             'xs': '501px',
  69.                             'sm': '315px',
  70.                             'md': '427px',
  71.                             'lg': '333px',
  72.                             'xl': '284px'
  73.                         },
  74.                         attributes:{
  75.                             'class':'product-image is-standard second-cover'
  76.                         }
  77.                     } %}
  78.                 {% endif %}
  79.                 {% sw_thumbnails 'product-image-thumbnails' with {
  80.                     media: cover,
  81.                     sizes: {
  82.                         'xs': '501px',
  83.                         'sm': '315px',
  84.                         'md': '427px',
  85.                         'lg': '333px',
  86.                         'xl': '284px'
  87.                     }
  88.                 } %}
  89.             {% else %}
  90.                 <div class="product-image-placeholder">
  91.                     {% sw_icon 'placeholder' style {
  92.                         'size': 'fluid'
  93.                     } %}
  94.                 </div>
  95.             {% endif %}
  96.         </a>
  97.         {% if config('core.cart.wishlistEnabled') %}
  98.             {% block component_product_box_wishlist_action %}
  99.             {% endblock %}
  100.         {% endif %}
  101.     </div>
  102. {% endblock %}