custom/plugins/HBCTheme/src/Resources/views/storefront/layout/header/search-suggest.html.twig line 36

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/header/search-suggest.html.twig' %}
  2. {% block layout_search_suggest_result_link %}
  3.     <a href="{{ seoUrl('frontend.detail.page', {'productId': product.id}) }}"
  4.        title="{{ product.translated.name }}"
  5.        class="search-suggest-product-link">
  6.         <div class="row align-items-center {{ gridNoGuttersClass }}">
  7.             {% block layout_search_suggest_result_image %}
  8.                 <div class="col-auto search-suggest-product-image-container">
  9.                     {% if product.cover.media.url %}
  10.                         {% sw_thumbnails 'search-suggest-product-image-thumbnails' with {
  11.                             media: product.cover.media,
  12.                             sizes: {
  13.                                 'default': '100px'
  14.                             },
  15.                             attributes: {
  16.                                 'class': 'search-suggest-product-image',
  17.                                 'alt': (product.cover.media.translated.alt ?: ''),
  18.                                 'title': (product.cover.media.translated.title ?: '')
  19.                             }
  20.                         } %}
  21.                     {% else %}
  22.                         {% sw_icon 'placeholder' style {
  23.                             'size': 'lg'
  24.                         } %}
  25.                     {% endif %}
  26.                 </div>
  27.             {% endblock %}
  28.             {% block layout_search_suggest_result_name %}
  29.                 <div class="col search-suggest-product-name">
  30.                     {{ product.translated.name }}
  31.                 </div>
  32.             {% endblock %}
  33.             {% block layout_search_suggest_result_price %}
  34.                 <div class="col-auto search-suggest-product-price">
  35.                     {% set price = product.calculatedPrice %}
  36.                     {% if product.calculatedPrices.count > 0 %}
  37.                         {% set price = product.calculatedPrices.last %}
  38.                     {% endif %}
  39.                     {% set referencePrice = price.referencePrice %}
  40.                     {% if product.calculatedPrices.count > 1 %}
  41.                         {{ "listing.listingTextFrom"|trans|sw_sanitize }}
  42.                     {% endif %}
  43.                     <span class="search-suggest-product-price">
  44.                                                         {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  45.                                                     </span>
  46.                     {% if price.referencePrice is not null %}
  47.                         <br><small class="search-suggest-product-reference-price">({{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }}&nbsp;{{ price.referencePrice.unitName }})</small>
  48.                     {% endif %}
  49.                     {% if price.regulationPrice.price is not null %}
  50.                         <small class="search-suggest-product-list-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</small>
  51.                     {% endif %}
  52.                 </div>
  53.             {% endblock %}
  54.         </div>
  55.         <div class="row align-items-center" style="margin-left: 20px">
  56.             {% for option in product.properties %}
  57.             <div>
  58.                 {{ option.name }}{% if not loop.last %} | &nbsp;{% endif %}
  59.             </div>
  60.             {% endfor %}
  61.         </div>
  62.     </a>
  63. {% endblock %}