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

Open in your IDE?
  1. {% block component_product_badges %}
  2.     <div class="product-badges">
  3.         {% block component_product_badges_discount %}
  4.             {% set price = product.calculatedPrice %}
  5.             {% if product.calculatedPrices.count > 0 %}
  6.                 {% set price = product.calculatedPrices.last %}
  7.             {% endif %}
  8.             {% set listPrice = price.listPrice.percentage > 0 %}
  9.             {% set hasRange = product.calculatedPrices.count > 1 %}
  10.             {% if listPrice and not hasRange %}
  11.                 <div class="badge badge-danger badge-discount">
  12.                     <span>&#37;</span>
  13.                 </div>
  14.             {% endif %}
  15.         {% endblock %}
  16.         {% block component_product_badges_topseller %}
  17.             {% if product.markAsTopseller %}
  18.                 <div>
  19.                     <span class="badge badge-warning badge-topseller">{{ "listing.boxLabelTopseller"|trans|sw_sanitize }}</span>
  20.                 </div>
  21.             {% endif %}
  22.         {% endblock %}
  23.         {% block component_product_badges_new %}
  24.             {% if product.isNew %}
  25.                 <div>
  26.                     <span class="badge badge-success badge-new">{{ "listing.boxLabelNew"|trans|sw_sanitize }}</span>
  27.                 </div>
  28.             {% endif %}
  29.         {% endblock %}
  30.     </div>
  31. {% endblock %}