{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
{% set variant = product|sylius_resolve_variant %}
{% set hasDiscount = variant ? variant|sylius_has_discount({'channel': sylius.channel}) : null %}
{% set discount = variant ? money.calculateDiscount(variant, {'channel': sylius.channel, 'zone': sylius.channel.defaultTaxZone}) : null %}
{% set tier_prices = variant ? variant.getTierPricesForChannel(sylius.channel, sylius.customer) : null %}
<div class="product-inline" {{ sylius_test_html_attribute('product') }}>
<a class="product-image-link link-heading me-4"
href="{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}">
{% include '@SyliusShop/Product/_mainImage.html.twig' with {'product': product, 'class': 'card-img-top'} %}
</a>
<div class="product-content">
<div class="product-content-top">
<h6 class="product-name fw-medium cfs-5" {{ sylius_test_html_attribute('product-name', product.name) }}>
<a class="link-heading stretched-link" href="{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}">{{ product.name }}</a>
</h6>
</div>
<div class="product-content-bottom">
<div class="product-price-wrap">
{% if not product.enabledVariants.empty() %}
{% if product.minPrice %}
<span class="text-nowrap">
<span class="product-price-from cfs-8">{{ 'app.ui.price_from'|trans }}</span>
<span class="product-price cfs-7" {{ sylius_test_html_attribute('product-price') }}>{{ money.convertAndFormatSpecial(product.minPrice, {'divisor': 100000, 'scale': 3 }) }}</span>
</span>
{% if product.maxPrice %}
<span class="text-nowrap">
<span class="product-price-from cfs-8">{{ 'app.ui.price_to'|trans }}</span>
<span class="product-price min-price cfs-7" {{ sylius_test_html_attribute('product-price') }}>{{ money.convertAndFormatSpecial(product.maxPrice, {'divisor': 100000, 'scale': 3 }) }}</span>
</span>
{% endif %}
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>