{% set product = variant.product %}

<div class="media">
    <div style="width: 100px" class="mr-2">
        {% if variant.hasImages %}
            {% include '@SyliusShop/Product/_mainImage.html.twig' with {'product': variant, 'filter': 'sylius_shop_product_tiny_thumbnail'} %}
        {% else %}
            {% include '@SyliusShop/Product/_mainImage.html.twig' with {'product': product, 'filter': 'sylius_shop_product_tiny_thumbnail'} %}
        {% endif %}
    </div>

    <div class="media-body">
        <h5 class="sylius-product-name" {{ sylius_test_html_attribute('product-name', item.productName) }}>{{ item.productName }}</h5>
        <p class="sylius-product-variant-code" {{ sylius_test_html_attribute('product-variant-code') }}>
            {{ variant.code }}
        </p>

        {% if product.hasOptions() %}
            <div class="sylius-product-options" {{ sylius_test_html_attribute('product-options') }}>
                {% for optionValue in variant.optionValues %}
                    <em data-sylius-option-name="{{ optionValue.name }}" {{ sylius_test_html_attribute('option-name', optionValue.name) }}>
                        {{ optionValue.value }}
                    </em>
                {% endfor %}
            </div>
        {% elseif item.variantName is not null %}
            <span class="sylius-product-variant-name" {{ sylius_test_html_attribute('product-variant-name') }}>
        {{ item.variantName }}
    </span>
        {% endif %}
    </div>
</div>
