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

Open in your IDE?
  1. {% sw_extends "@Shopware/storefront/component/product/card/box-standard.html.twig" %}
  2. {% block component_product_box_content %}
  3.     {{ parent() }}
  4.     <div class="cytex-product-listing-backdrop"></div>
  5. {% endblock %}
  6. {% block component_product_box_description %}
  7. {% endblock %}
  8. {% block component_product_box_variant_characteristics %}
  9.     <div class="product-listing-productnumber">
  10.         <span>
  11.              {{ product.productNumber }}
  12.          </span>
  13.     </div>
  14.     <div class="product-listing-amount-text">
  15.         {% if product.extensions.additionalProductInfo.translated.customField2 %}
  16.                  <span>
  17.                      {{ "component.product.feature.label.amount"|trans|sw_sanitize }}
  18.                  </span>
  19.                 {{ product.extensions.additionalProductInfo.translated.customField2|raw }}
  20.         {% endif %}
  21.     </div>
  22. {% endblock %}
  23. {% block component_product_box_image %}
  24.     <div class="product-image-wrapper">
  25.         {# fallback if display mode is not set #}
  26.         {% set displayMode = displayMode ?: 'standard' %}
  27.         {# set display mode 'cover' for box-image with standard display mode #}
  28.         {% if layout == 'image' and displayMode == 'standard' %}
  29.             {% set displayMode = 'cover' %}
  30.         {% endif %}
  31.         {% if product.extensions.alternativeCover|length > 0 %}
  32.             {% set altImage = product.extensions.alternativeCover.cover %}
  33.         {% endif %}
  34.         <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  35.            title="{{ name }}">
  36.             <div class="product-image-link position-relative is-{{ displayMode }} {{ altImage is defined ? 'main-image' : '' }}">
  37.                 {% if cover.url %}
  38.                     {% set attributes = {
  39.                         'class': 'product-image is-'~displayMode,
  40.                         'alt': (cover.translated.alt ?: name),
  41.                         'title': (cover.translated.title ?: name)
  42.                     } %}
  43.                     {% if displayMode == 'cover' or displayMode == 'contain' %}
  44.                         {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  45.                     {% endif %}
  46.                     {% sw_thumbnails 'product-image-thumbnails' with {
  47.                         media: cover,
  48.                         sizes: sizes
  49.                     } %}
  50.                 {% else %}
  51.                     <div class="product-image-placeholder">
  52.                         {% sw_icon 'placeholder' style {
  53.                             'size': 'fluid'
  54.                         } %}
  55.                     </div>
  56.                 {% endif %}
  57.             </div>
  58.             {% if altImage is defined %}
  59.                 <div class="product-image-link is-{{ displayMode }} alt-image">
  60.                     {% set attributes = {
  61.                         'class': 'product-image is-'~displayMode,
  62.                         'alt': (altImage.translated.alt ?: name),
  63.                         'title': (cover.translated.title ?: name)
  64.                     } %}
  65.                     {% if displayMode == 'cover' or displayMode == 'contain' %}
  66.                         {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  67.                     {% endif %}
  68.                     {% sw_thumbnails 'product-image-thumbnails' with {
  69.                         media: altImage,
  70.                         sizes: 260
  71.                     } %}
  72.                 </div>
  73.             {% endif %}
  74.         </a>
  75.         {% if config('CoeWishlistSw6.config.wishlistButtonOnListing') %}
  76.             {% sw_include '@Storefront/storefront/component/wishlist/button/add-note.html.twig' %}
  77.         {% endif %}
  78.         {% if config('core.cart.wishlistEnabled') %}
  79.             {% block component_product_box_wishlist_action %}
  80.                 {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  81.                     appearance: 'circle',
  82.                     productId: id
  83.                 } %}
  84.             {% endblock %}
  85.         {% endif %}
  86.     </div>
  87. {% endblock %}