{% sw_extends '@Storefront/storefront/component/product/card/badges.html.twig' %}
{% block component_product_badges_new %}
{{ parent() }}
{% block discount_category_badge_discount %}
{% if product.extensions.premsProductDiscounts %}
{# @var discount Prems\Plugin\PremsDiscountCategory6\Core\Entity\DiscountCategory\DiscountCategoryBaseEntity #}
{% for discount in product.extensions.premsProductDiscounts.all %}
{% if discount.ShowDiscountBadgeInListing and not discount.isUpprice %}
<div>
<span class="badge badge-discount" style="color: {{ discount.listingBadgeTextColor }}; background-color: {{ discount.listingBadgeBackgroundColor }}">{{ discount.translated.listingBadgeTitle }}</span>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% endblock %}
{% endblock %}