{% set product = variant.product %}

<div class="media">
    <div class="cart-item-img-wrapper">
        {% 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">
        <p class="cart-item-product-name" {{ sylius_test_html_attribute('product-name', item.productName) }}>{{ item.productName }}</p>
        <p class="cart-item-product-variant-code" {{ sylius_test_html_attribute('product-variant-code') }}>
            {{ variant.code }}
        </p>

        {% if product.hasOptions() %}
            <div class="cart-item-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="cart-item-product-variant-name" {{ sylius_test_html_attribute('product-variant-name') }}>
        {{ item.variantName }}
    </span>
        {% endif %}
    </div>
</div>
