custom/plugins/BettenABC/src/Resources/views/storefront/component/product/card/price-unit.html.twig line 1

Open in your IDE?
  1. {#
  2. # Project:      www.betten-abc.de
  3. # Company:      arboro GmbH
  4. # Created by:   Daniel Geike
  5. # Created on:   25.08.22
  6. # Description:
  7. #}
  8. {% sw_extends "@Storefront/storefront/component/product/card/price-unit.html.twig" %}
  9. {% block component_product_box_price %}
  10.     <div class="product-price-wrapper">
  11.         {% set price = real %}
  12.         {% set isListPrice = price.listPrice.percentage > 0 %}
  13.         {% set isRegulationPrice = price.regulationPrice != null %}
  14.         <div class="product-cheapest-price{% if isListPrice and price.regulationPrice.price and not displayFrom %} with-list-price{% endif %}{% if isRegulationPrice and displayFrom %} with-regulation-price{% endif %}">
  15.             {% if cheapest.unitPrice != real.unitPrice %}
  16.                 <div>{{ "listing.cheapestPriceLabel"|trans|sw_sanitize }}
  17.                     <span class="product-cheapest-price-price"> {{ cheapest.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  18.                 </div>
  19.             {% endif %}
  20.         </div>
  21.         {% if isListPrice and not displayFrom %}
  22.             {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  23.             {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  24.             {% set hideStrikeTrough = beforeListPriceSnippetExists or afterListPriceSnippetExists %}
  25.             <span class="list-price{% if hideStrikeTrough %} list-price-no-line-through{% endif %}">
  26.                 {% if beforeListPriceSnippetExists %}{{ "listing.beforeListPrice"|trans|trim|sw_sanitize }}{% endif %}
  27.                 <span class="list-price-price">{{ price.listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  28.                 {% if afterListPriceSnippetExists %}{{ "listing.afterListPrice"|trans|trim|sw_sanitize }}{% endif %}
  29.             </span>
  30.         {% else %}
  31.             <div class="list-price-price is-empty"></div>
  32.         {% endif %}
  33.         <span class="product-price{% if product.markAsTopseller %} with-list-price{% endif %}">
  34.             {% if displayFrom %}{{ "listing.listingTextFrom"|trans|sw_sanitize }}{% endif %} {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  35.         </span>
  36.         {% if isRegulationPrice %}
  37.             <span class="product-price with-regulation-price">
  38.                 {% if isListPrice %}
  39.                     <br/>
  40.                 {% endif %}
  41.                 <span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</span>
  42.             </span>
  43.         {% endif %}
  44.     </div>
  45. {% endblock %}