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