{% sw_extends '@Storefront/storefront/layout/header/search-suggest.html.twig' %}
{% block layout_search_suggest_result_link %}
<a href="{{ seoUrl('frontend.detail.page', {'productId': product.id}) }}"
title="{{ product.translated.name }}"
class="search-suggest-product-link">
<div class="row align-items-center {{ gridNoGuttersClass }}">
{% block layout_search_suggest_result_image %}
<div class="col-auto search-suggest-product-image-container">
{% if product.cover.media.url %}
{% sw_thumbnails 'search-suggest-product-image-thumbnails' with {
media: product.cover.media,
sizes: {
'default': '100px'
},
attributes: {
'class': 'search-suggest-product-image',
'alt': (product.cover.media.translated.alt ?: ''),
'title': (product.cover.media.translated.title ?: '')
}
} %}
{% else %}
{% sw_icon 'placeholder' style {
'size': 'lg'
} %}
{% endif %}
</div>
{% endblock %}
{% block layout_search_suggest_result_name %}
<div class="col search-suggest-product-name">
{{ product.translated.name }}
</div>
{% endblock %}
{% block layout_search_suggest_result_price %}
<div class="col-auto search-suggest-product-price">
{% set price = product.calculatedPrice %}
{% if product.calculatedPrices.count > 0 %}
{% set price = product.calculatedPrices.last %}
{% endif %}
{% set referencePrice = price.referencePrice %}
{% if product.calculatedPrices.count > 1 %}
{{ "listing.listingTextFrom"|trans|sw_sanitize }}
{% endif %}
<span class="search-suggest-product-price">
{{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
</span>
{% if price.referencePrice is not null %}
<br><small class="search-suggest-product-reference-price">({{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }})</small>
{% endif %}
{% if price.regulationPrice.price is not null %}
<small class="search-suggest-product-list-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</small>
{% endif %}
</div>
{% endblock %}
</div>
<div class="row align-items-center" style="margin-left: 20px">
{% for option in product.properties %}
<div>
{{ option.name }}{% if not loop.last %} | {% endif %}
</div>
{% endfor %}
</div>
</a>
{% endblock %}