{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
{% set variant = product|sylius_resolve_variant %}
{% set channelpricing = variant.getChannelPricingForChannel(sylius.channel) %}
{% set percentage = channelpricing.getDiscountedPercentage %}
<div class="picto-promo" {% if percentage and percentage > 0 %} style="display:inline-block" {% else %} style="display:none" {% endif %}>
<strong><span data-js-product-percentage >
{% if channelpricing.discountedPrice and channelpricing.price > channelpricing.discountedPrice %}
{{ percentage|round(0) }}%
{% endif %}
</span>
</strong>
</div>
<span class="article-normal line-through" data-js-product-discounted-price {{ sylius_test_html_attribute('product-price', money.calculatePrice(product|sylius_resolve_variant)) }}>
{% set variant = product|sylius_resolve_variant %}
{% set channelpricing = variant.getChannelPricingForChannel(sylius.channel) %}
{% if channelpricing.discountedPrice and channelpricing.price > channelpricing.discountedPrice %}
{{ money.convertAndFormat(channelpricing.price)}}
{% endif %}
</span>
<strong data-js-product-price id="product-price" class="article-promo">{{ money.calculatePrice(product|sylius_resolve_variant) }}</strong>