{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}

<a href="{{ path(result.urlParams.path, result.urlParams.params) }}">
    <div class="card {{ not last ? 'mb-3' }}" style="max-width: 540px;">
        <div class="row no-gutters">
            <div class="col-md-4">
                {% if result.image is not empty %}
                    {% set path = result.image|imagine_filter(filter|default('sylius_shop_product_thumbnail')) %}
                {% else %}
                    {% set path = '//placehold.it/200x200' %}
                {% endif %}

                <img src="{{ path }}" alt="{{ result.attribute('name').value | join }}" class="card-img" />
            </div>
            <div class="col-md-8">
                <div class="card-body">
                    <h6 class="card-title">{{ result.attribute('name').value | join }}</h6>
                    {% if result.price is not empty %}
                        <p class="card-text">{{ money.format(result.priceByChannelAndCurrency(channel.code, currencyCode).value, currencyCode) }}</p>
                    {% endif %}
                </div>
            </div>
        </div>
    </div>
</a>
