custom/plugins/WebLabels/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_discount %}
  3.             {% set listPrice = product.priceRange or product.calculatedPrices.count > 0 ? null : product.calculatedPrice.listPrice.percentage > 0 %}
  4.             {% if product.translated.customFields.custom_same_day_checkbox %}
  5.             <div class="badge-same-day">
  6.                 <span class="badge">{{ "wlcustom.product_box.same_day"|trans }}</span>
  7.             </div>
  8.           {% endif %}
  9.           
  10.            {% if product.translated.customFields.custom_lokal_lokal_ or  product.translated.customFields.custom_lokal_region_ %}
  11.                 {% if (product.translated.customFields.custom_lokal_lokal_ and  product.translated.customFields.custom_lokal_region_) or (product.translated.customFields.custom_lokal_lokal_ and  product.translated.customFields.custom_lokal_region_ == false) %}
  12.                 <div class="badge-lokal">
  13.                     <span class="badge">Lokales Produkt</span>
  14.                 </div>
  15.                 {% endif %}
  16.             {% if (product.translated.customFields.custom_lokal_lokal_ == false) and  product.translated.customFields.custom_lokal_region_ %}
  17.                 <div class="badge-lokal">
  18.                     <span class="badge">Aus der Region</span>
  19.                 </div>
  20.             {% endif %}
  21.           {% endif %}
  22.             {% if listPrice or product.isNew %}
  23.                 {% if (product.isNew and listPrice) or (product.isNew and listPrice == false) %}
  24.                     <div class="badge-success">
  25.                         <span class="badge badge-new">{{ "listing.boxLabelNew"|trans|sw_sanitize }}</span>
  26.                     </div>
  27.                 {% endif %}
  28.                 {% if (product.isNew == false and listPrice) %}
  29.                     <div class="badge-danger">
  30.                         <span class="badge badge-discount">Sale</span>
  31.                     </div>
  32.                 {% endif %}
  33.             {% endif %}
  34.           
  35.         {% endblock %}
  36.         {% block component_product_badges_new %}
  37.  
  38.         {% endblock %}
  39.