{% import "@SyliusShop/Common/Macro/money.html.twig" as money %} {# Valeurs par défaut (pour éviter les erreurs si aucune variante) #} {% set has_discount = false %} {% set price = null %} {% set original_price = null %} {% set applied_promotions = [] %} {% if not product.enabledVariants.empty() %} {% set variant = product|sylius_resolve_variant %} {% if variant is not null %} {% set has_discount = variant|sylius_has_discount({'channel': sylius.channel}) %} {% set price = money.calculatePrice(variant) %} {% set original_price = money.calculate_original_price(variant) %} {% set applied_promotions = variant.getappliedPromotionsForChannel(sylius.channel) %} {% endif %} {% endif %}