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

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
  2. {% block component_product_box_price_unit %}
  3.     {% if context.customer %}
  4.         {{ parent() }}
  5.     {% endif %}
  6. {% endblock %}
  7. {% block component_product_box_price %}
  8.     {% if context.customer %}
  9.         <div class="product-price-wrapper">
  10.             {% set price = real %}
  11.             {% set isListPrice = price.listPrice.percentage != null %}
  12.             {% set isRegulationPrice = price.regulationPrice != null %}
  13.             <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 %}">
  14.                 {#
  15.                 {% if cheapest.unitPrice != real.unitPrice %}
  16.                     <div>{{ "listing.cheapestPriceLabel"|trans|sw_sanitize }}<span class="product-cheapest-price-price"> {{ cheapest.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}</span></div>
  17.                 {% endif %}
  18.                 #}
  19.             </div>
  20.             {% if displayFrom %}
  21.                 {{ "listing.listingTextFrom"|trans|sw_sanitize }}
  22.             {% endif %}
  23.             <span class="product-price{% if isListPrice and not displayFrom %} with-list-price d-flex flex-wrap{% endif %}">
  24.                 {{ price.listPrice.price|default(price.unitPrice)|currency }}{{ "general.star"|trans|sw_sanitize }}
  25.                 {% if isListPrice and not displayFrom %}
  26.                     {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 and "listing.afterListPrice"|trans != "listing.afterListPrice" %}
  27.                     {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 and "listing.beforeListPrice"|trans != "listing.beforeListPrice" %}
  28.                     {% set hideStrikeTrough = beforeListPriceSnippetExists or afterListPriceSnippetExists %}
  29.                     <span class="list-price d-flex flex-column{% if hideStrikeTrough %} list-price-no-line-through{% endif %}">
  30.                         {% if beforeListPriceSnippetExists %}{{ "listing.beforeListPrice"|trans|trim|sw_sanitize }}{% endif %}
  31.                         <span class="list-price-price">{{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  32.                         {% if afterListPriceSnippetExists %}{{ "listing.afterListPrice"|trans|trim|sw_sanitize }}{% endif %}
  33.                         <span class="list-price-percentage">{{ "detail.listPricePercentage"|trans({'%price%': price.listPrice.extensions.percentage })|sw_sanitize }}</span>
  34.                     </span>
  35.                 {% endif %}
  36.             </span>
  37.             {% if isRegulationPrice %}
  38.                 <span class="product-price with-regulation-price">
  39.                     {% if isListPrice %}<br/>{% endif %}<span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</span>
  40.                 </span>
  41.             {% endif %}
  42.         </div>
  43.     {% endif %}
  44. {% endblock %}