custom/static-plugins/LDSCustom/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 %}
  3.     <div class="product-price-wrapper">
  4.         {% set price = real %}
  5.         {% set isListPrice = price.listPrice.percentage > 0 %}
  6.         {% set isRegulationPrice = price.regulationPrice != null %}
  7.         <div class="product-cheapest-price{% if isListPrice and isRegulationPrice and not displayFrom and not displayFromVariants %} with-list-price{% endif %}{% if isRegulationPrice and not displayFrom and displayFromVariants %} with-regulation-price{% endif %}{% if displayFrom and isRegulationPrice %} with-from-price{% endif %}">
  8.             {% if cheapest.unitPrice != real.unitPrice %}
  9.                 <div>{{ "listing.cheapestPriceLabel"|trans|sw_sanitize }}<span class="product-cheapest-price-price">
  10.                         {{ cheapest.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  11.                 </div>
  12.             {% endif %}
  13.         </div>
  14.         {% if displayFrom or (displayParent and displayFromVariants) %}
  15.             {{ "listing.listingTextFrom"|trans|sw_sanitize }}
  16.         {% endif %}
  17.         <span class="product-price{% if isListPrice and not displayFrom and not displayFromVariants %} with-list-price{% endif %}">
  18.             {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  19.             {% if isListPrice and not displayFrom and not displayFromVariants %}
  20.                 {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  21.                 {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  22.                 {% set hideStrikeTrough = beforeListPriceSnippetExists or afterListPriceSnippetExists %}
  23.                 <span class="list-price{% if hideStrikeTrough %} list-price-no-line-through{% endif %}">
  24.                     {% if beforeListPriceSnippetExists %}
  25.                         {{ "listing.beforeListPrice"|trans|trim|sw_sanitize }}
  26.                     {% endif %}
  27.                     <span class="list-price-price">{{ price.listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  28.                     {% if afterListPriceSnippetExists %}
  29.                         {{ "listing.afterListPrice"|trans|trim|sw_sanitize }}
  30.                     {% endif %}
  31.                 </span>
  32.             {% endif %}
  33.         </span>
  34.         {% if isRegulationPrice %}
  35.             <span class="product-price with-regulation-price">
  36.                 {% if isListPrice %}<br/>
  37.                 {% endif %}
  38.                 <span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</span>
  39.             </span>
  40.         {% endif %}
  41.     </div>
  42. {% endblock %}