custom/apps/AtlKatanaTheme/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"> {{ cheapest.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}</span></div>
  10.             {% endif %}
  11.         </div>
  12.         {% if displayFrom or (displayParent and displayFromVariants) %}
  13.             {{ "listing.listingTextFrom"|trans|sw_sanitize }}
  14.         {% endif %}
  15.         <span class="product-price{% if isListPrice and not displayFrom and not displayFromVariants %} with-list-price{% endif %}">
  16.             {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  17.             {% if isListPrice and not displayFrom and not displayFromVariants %}
  18.                 {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  19.                 {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  20.                 <span class="list-price">
  21.                     {% if beforeListPriceSnippetExists %}{{ "listing.beforeListPrice"|trans|trim|sw_sanitize }}{% endif %}
  22.                     <span class="list-price-price">{{ price.listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  23.                     {% if afterListPriceSnippetExists %}{{ "listing.afterListPrice"|trans|trim|sw_sanitize }}{% endif %}
  24.                 </span>
  25.             {% endif %}
  26.         </span>
  27.         {% if isRegulationPrice %}
  28.             <span class="product-price with-regulation-price">
  29.                 {% if isListPrice %}<br/>{% endif %}<span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</span>
  30.             </span>
  31.         {% endif %}
  32.     </div>
  33.     {% block component_product_box_price_unit_reference_content %}
  34.         {% set showReferencePrice = price.referencePrice is not null %}
  35.         {% if theme_config('atl-cms-product-box-use-placeholders') == 'true' %}
  36.             {% set showReferencePrice = true %}
  37.         {% endif %}
  38.         {% if theme_config('atl-cms-product-box-reference-price') == 'below-price' and showReferencePrice %}
  39.             <div class="product-price-unit-reference-content">
  40.                 {% if price.referencePrice is not null %}
  41.                     {{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}
  42.                 {% endif %}
  43.             </div>
  44.         {% endif %}
  45.     {% endblock %}
  46. {% endblock %}