custom/plugins/zenitPlatformStratus/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_name %}
  3.     {% if theme_config('zen-product-listing-card-ordernumber') == 'prepend' and product.productNumber %}
  4.         <div class="product-ordernumber">{{ product.productNumber }}</div>
  5.     {% endif %}
  6.     {{ parent() }}
  7.     {% if theme_config('zen-product-listing-card-ordernumber') == 'append' and product.productNumber %}
  8.         <div class="product-ordernumber">{{ product.productNumber }}</div>
  9.     {% endif %}
  10. {% endblock %}
  11. {% block component_product_box_image %}
  12.     {# fallback if display mode is not set #}
  13.     {% set displayMode = displayMode ?: 'standard' %}
  14.     {# set display mode 'cover' for box-image with default display mode #}
  15.     {% if layout == 'image' and displayMode == 'standard' %}
  16.         {% set displayMode = 'cover' %}
  17.     {% endif %}
  18.     <div class="product-image-wrapper is-{{ displayMode }}">
  19.         {% block component_product_box_image_link %}
  20.             <a href="{{ seoUrl('frontend.detail.page', { 'productId': id }) }}"
  21.                title="{{ name }}"
  22.                class="product-image-link is-{{ displayMode }}">
  23.                 {% block component_product_box_image_link_inner %}
  24.                     {% if cover.url %}
  25.                         {% set attributes = {
  26.                             'class': 'product-image is-'~displayMode,
  27.                             'alt': (cover.translated.alt ?: name),
  28.                             'title': (cover.translated.title ?: name)
  29.                         } %}
  30.                         {% if displayMode == 'cover' or displayMode == 'contain' %}
  31.                             {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  32.                         {% endif %}
  33.                         {# ... enables lazy loading for images #}
  34.                         {% if config('zenitPlatformStratus.config.lazyloading') and element.type is not same as ('product-slider') %}
  35.                             {% set attributes = attributes|merge({ 'loading': 'lazy' }) %}
  36.                         {% endif %}
  37.                         {% block component_product_box_image_thumbnail %}
  38.                             {% sw_thumbnails 'product-image-thumbnails' with {
  39.                                 media: cover,
  40.                                 sizes: sizes
  41.                             } %}
  42.                         {% endblock %}
  43.                     {% else %}
  44.                         {% block component_product_box_image_placeholder %}
  45.                             <div class="product-image-placeholder">
  46.                                 {% sw_icon 'placeholder' style {
  47.                                     'size': 'fluid'
  48.                                 } %}
  49.                             </div>
  50.                         {% endblock %}
  51.                     {% endif %}
  52.                     {% block zen_component_product_box_image_switch %}
  53.                         {% sw_include '@zenitPlatformStratus/storefront/component/product/card/zen-cover-switch.html.twig' %}
  54.                     {% endblock %}
  55.                 {% endblock %}
  56.             </a>
  57.         {% endblock %}
  58.         {% block zen_component_product_box_overlay_product_actions %}
  59.             <div class="overlay-product-actions">
  60.                 {% block zen_component_product_box_overlay_product_actions_inner %}
  61.                     {% if config('core.cart.wishlistEnabled') %}
  62.                         {% block component_product_box_wishlist_action %}
  63.                             {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  64.                                 appearance: 'circle',
  65.                                 productId: id,
  66.                                 tooltip: true,
  67.                                 tooltipPlacement: 'left'
  68.                             } %}
  69.                         {% endblock %}
  70.                     {% endif %}
  71.                     {% if theme_config('zen-product-listing-card-actions-quickview') %}
  72.                         {% block zen_component_product_box_quickview_action %}
  73.                             {% sw_include '@zenitPlatformStratus/storefront/component/product/card/zen-action-quickview-toggle.html.twig' with {
  74.                                 tooltip: true,
  75.                                 tooltipPlacement: 'left'
  76.                             } %}
  77.                         {% endblock %}
  78.                     {% endif %}
  79.                 {% endblock %}
  80.             </div>
  81.         {% endblock %}
  82.         {% block zen_component_product_box_action_overlay_rating %}
  83.             {% if config('core.listing.showReview') and theme_config('zen-product-listing-card-rating-position') is not same as ('default') %}
  84.                 <div class="product-rating">
  85.                     {% if product.ratingAverage %}
  86.                         {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  87.                             points: product.ratingAverage,
  88.                             style: 'text-primary'
  89.                         } %}
  90.                     {% endif %}
  91.                 </div>
  92.             {% endif %}
  93.         {% endblock %}
  94.         {% block zen_component_product_box_action_overlay %}
  95.             {% if theme_config('zen-product-listing-card-actions') is same as ('overlay') %}
  96.                 {% sw_include '@Storefront/storefront/component/product/card/action.html.twig' %}
  97.             {% endif %}
  98.         {% endblock %}
  99.     </div>
  100. {% endblock %}
  101. {% block component_product_box_rating %}
  102.     {% if theme_config('zen-product-listing-card-rating-position') is same as ('default') %}
  103.         {{ parent() }}
  104.     {% endif %}
  105. {% endblock %}
  106. {% block component_product_box_variant_characteristics %}
  107.     {% if theme_config('zen-product-listing-card-variant-characteristics') %}
  108.         {{ parent() }}
  109.     {% endif %}
  110. {% endblock %}
  111. {% block component_product_box_description %}
  112.     {% if theme_config('zen-product-listing-card-meta-description') and product.translated.metaDescription|striptags|raw is not empty %}
  113.         <div class="product-description">
  114.             {{ product.translated.metaDescription|striptags|raw }}
  115.         </div>
  116.     {% else %}
  117.         {{ parent() }}
  118.     {% endif %}
  119. {% endblock %}
  120.  {% block component_product_box_action %}
  121.      {% if theme_config('zen-product-listing-card-actions') is not same as ('overlay') %}
  122.          {{ parent() }}
  123.      {% endif %}
  124.  {% endblock %}