vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Resources/views/Product/Show/_variants.html.twig line 1
{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
<table class="ui single line small table" id="sylius-product-variants" {{ sylius_test_html_attribute('product-variants') }}>
<thead>
<tr>
<th>{{ 'sylius.ui.variant'|trans }}</th>
<th>{{ 'sylius.ui.price'|trans }}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for key, variant in product.enabledVariants %}
{% set channelPricing = variant.getChannelPricingForChannel(sylius.channel) %}
<tr {{ sylius_test_html_attribute('product-variants-row') }}>
<td>
{{ variant.name|default(variant.descriptor) }}
{% if product.hasOptions() %}
<div class="ui horizontal divided list">
{% for optionValue in variant.optionValues %}
<div class="item">
{{ optionValue.value }}
</div>
{% endfor %}
</div>
{% endif %}
</td>
{% set appliedPromotions = channelPricing.appliedPromotions|map(promotion => ({'label': promotion.label, 'description': promotion.description})) %}
<td class="sylius-product-variant-price" data-applied-promotions="{{ appliedPromotions|json_encode }}" {% if variant|sylius_has_discount({'channel': sylius.channel}) %}data-original-price="{{ money.calculateOriginalPrice(variant) }}"{% endif %}>
{{ money.calculatePrice(variant) }}
</td>
<td class="right aligned">
{{ form_widget(form.cartItem.variant[key], {'label': false}) }}
</td>
</tr>
{% endfor %}
</tbody>
</table>