{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
{% set variant = product|sylius_resolve_variant %}
{% set hasDiscount = variant|sylius_has_discount({'channel': sylius.channel}) %}
{% set appliedPromotions = variant.getChannelPricingForChannel(sylius.channel).getAppliedPromotions() %}
{% set taxon = product.mainTaxon %}
{% include '@SyliusShop/Product/Show/_catalogPromotionLabels.html.twig' with {'appliedPromotions': appliedPromotions, 'withDescription': true} %}
<span class="ui huge header {% if hasDiscount %}has_discount{% endif %}"{% if hasDiscount %} style="color:#DF0000;" {% endif %} id="product-price" {{ sylius_test_html_attribute('product-price', money.calculatePrice(variant)) }}>
{{ money.calculatePrice(variant) }}
</span>
{% if taxon is not null and taxon.code in ['storyteller', 'headphones'] %}
<span class="ui small header free-delivery">
{{ 'sylius.pages.content.freeDeliveryFrance.title' | trans }}
</span>
{% endif %}
<span class="ui small header" id="product-original-price"{% if not hasDiscount %} style="display: none;"{% endif %} {{ sylius_test_html_attribute('product-original-price', money.calculateOriginalPrice(variant)) }}>
{% if hasDiscount %}
<del>{{ money.calculateOriginalPrice(variant) }}</del>
{% endif %}
</span>
<script>
let price = document.getElementById('product-price').innerHTML;
let title = document.getElementById('sylius-product-name').innerHTML;
console.log(price);
console.log(title);
if(parseInt(price) === 0 && title.includes('quiz')){
document.getElementById('product-price').innerHTML = "";
}
</script>