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

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/card/box-minimal.html.twig' %}
  2. {% block component_product_box_image %}
  3.                   
  4.                         <div class="product-image-wrapper">
  5.                             {# fallback if display mode is not set #}
  6.                             {% set displayMode = displayMode ?: 'standard' %}
  7.                             {# set display mode 'cover' for box-image with standard display mode #}
  8.                             {% if layout == 'image' and displayMode == 'standard' %}
  9.                                 {% set displayMode = 'cover' %}
  10.                             {% endif %}
  11.                             <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  12.                                title="{{ name }}"
  13.                                class="product-image-link is-{{ displayMode }}">
  14.                                 {% if cover.url %}
  15.                                     {% set attributes = {
  16.                                         'class': 'product-image is-'~displayMode,
  17.                                         'alt': (cover.translated.alt ?: name),
  18.                                         'title': (cover.translated.title ?: name)
  19.                                     } %}
  20.                                     {% if displayMode == 'cover' or displayMode == 'contain' %}
  21.                                         {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  22.                                     {% endif %}
  23.                                     {% sw_thumbnails 'product-image-thumbnails' with {
  24.                                         media: cover,
  25.                                         sizes: sizes
  26.                                     } %}
  27.                                 {% else %}
  28.                                     <div class="product-image-placeholder">
  29.                                         {% sw_icon 'placeholder' style {
  30.                                             'size': 'fluid'
  31.                                         } %}
  32.                                     </div>
  33.                                 {% endif %}
  34.                             </a>
  35.                             
  36.                             {% if config('core.cart.wishlistEnabled') %}
  37.                                 {% block component_product_box_wishlist_action %}
  38.                                     {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  39.                                         appearance: 'circle',
  40.                                         productId: id
  41.                                     } %}
  42.                                 {% endblock %}
  43.                             {% endif %}
  44.                         </div>
  45.                     {% endblock %}
  46. {% block component_product_box_info %}
  47.     <div class="product-info">
  48.         
  49.         {% block component_product_box_name %}
  50.             <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  51.                class="product-name"
  52.                title="{{ name }}">
  53.                 {{ name }}
  54.             </a>
  55.         {% endblock %}
  56.         
  57.         {% block component_product_box_rating %}
  58.                               {% if config('core.listing.showReview') %}
  59.                                   <div class="product-rating">
  60.                                       {% if product.ratingAverage %}
  61.                                           {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  62.                                               points: product.ratingAverage,
  63.                                               style: 'text-primary'
  64.                                           } %}
  65.                                       {% endif %}
  66.                                   </div>
  67.                               {% endif %}
  68.         {% endblock %}
  69.         
  70.         {% block component_product_box_price %}
  71.             {% sw_include '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
  72.         {% endblock %}
  73.         {% block component_product_box_action %}
  74.             {% sw_include '@Storefront/storefront/component/product/card/action.html.twig' %}
  75.         {% endblock %}
  76.         
  77.         
  78.     </div>
  79. {% endblock %}