custom/plugins/PremsDiscountCategory6/src/Resources/views/storefront/component/product/card/badges.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/card/badges.html.twig' %}
  2. {% block component_product_badges_new %}
  3.     {{ parent() }}
  4.     {% block discount_category_badge_discount %}
  5.         {% if product.extensions.premsProductDiscounts %}
  6.             {# @var discount Prems\Plugin\PremsDiscountCategory6\Core\Entity\DiscountCategory\DiscountCategoryBaseEntity #}
  7.             {% for discount in product.extensions.premsProductDiscounts.all %}
  8.                 {% if discount.ShowDiscountBadgeInListing and not discount.isUpprice %}
  9.                     <div>
  10.                         <span class="badge badge-discount" style="color: {{ discount.listingBadgeTextColor }}; background-color: {{ discount.listingBadgeBackgroundColor }}">{{ discount.translated.listingBadgeTitle }}</span>
  11.                     </div>
  12.                 {% endif %}
  13.             {% endfor %}
  14.         {% endif %}
  15.     {% endblock %}
  16. {% endblock %}