custom/plugins/LiamoriaBaseTheme/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}) }}"
  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: {'xs': '501px',
  25.                                                 'sm': '315px',
  26.                                                 'md': '332px',
  27.                                                 'lg': '480px',
  28.                                                 'xl': '480px',}
  29.                                     } %}
  30.                                 {% else %}
  31.                                     <div class="product-image-placeholder">
  32.                                         {% sw_icon 'placeholder' style {
  33.                                             'size': 'fluid'
  34.                                         } %}
  35.                                     </div>
  36.                                 {% endif %}
  37.                             </a>
  38.                             {% if config('core.cart.wishlistEnabled') %}
  39.                                 {% block component_product_box_wishlist_action %}
  40.                                     {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  41.                                         appearance: 'circle',
  42.                                         productId: id
  43.                                     } %}
  44.                                 {% endblock %}
  45.                             {% endif %}
  46.                         </div>
  47.                     {% endblock %}
  48.                     {% block component_product_box_info %}
  49.                         <div class="product-info">
  50.                             {% block component_product_box_rating %}
  51.                                 {% if config('core.listing.showReview') %}
  52.                                     <div class="product-rating">
  53.                                         {% if product.ratingAverage %}
  54.                                             {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  55.                                                 points: product.ratingAverage,
  56.                                                 style: 'text-primary'
  57.                                             } %}
  58.                                         {% endif %}
  59.                                     </div>
  60.                                 {% endif %}
  61.                             {% endblock %}
  62.                             {% block component_product_box_name %}
  63.                                 <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  64.                                    class="product-name"
  65.                                    title="{{ name }}">
  66.                                     "{{ name }}"
  67.                                     {% if product.markAsTopseller or product.isNew %}
  68.                                         {% if product.isNew and not product.markAsTopseller %}
  69.                                             <span class="new-badget">
  70.                                             {{ "listing.boxLabelNew"|trans|sw_sanitize }}
  71.                                             </span>
  72.                                         {% else %}
  73.                                             <span class="new-badget">{{ "listing.boxLabelTopseller"|trans|sw_sanitize }}</span>
  74.                                         {% endif %}
  75.                                     {% endif %}
  76.                                     <span class="product-name-extends">
  77.                                        {{ "listing.productNameExtends"|trans|sw_sanitize }}
  78.                                     </span>
  79.                                 </a>
  80.                             {% endblock %}
  81.                             {% block component_product_box_variant_characteristics %}
  82.                             {% endblock %}
  83.                             {% block component_product_box_description %}
  84.                                 <div class="product-description">
  85.                                     {{ product.translated.description|striptags|raw }}
  86.                                 </div>
  87.                             {% endblock %}
  88.                             {% block component_product_box_price %}
  89.                                 {% sw_include '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
  90.                             {% endblock %}
  91.                             {% block component_product_box_action %}
  92.                             {% endblock %}
  93.                         </div>
  94.                     {% endblock %}