vendor/gourmops/theme/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 (referencePrice and referencePrice.unitName) or ( referencePrice is not null ) %}
  4.         {{ parent() }}
  5.     {% endif %}
  6. {% endblock %}
  7. {% block component_product_box_price %}
  8.     <div class="product-price-wrapper">
  9.         {% set price = real %}
  10.         {% set isListPrice = price.listPrice.percentage > 0 %}
  11.         {% set isRegulationPrice = price.regulationPrice != null %}
  12.         {% set weight = product.weight %}
  13.         {% if cheapest.unitPrice != real.unitPrice %}
  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.                 <div>{{ "listing.cheapestPriceLabel"|trans|sw_sanitize }}<span
  16.                             class="product-cheapest-price-price"> {{ cheapest.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  17.                 </div>
  18.             </div>
  19.         {% endif %}
  20.         {% if displayFrom %}
  21.             {{ "listing.listingTextFrom"|trans|sw_sanitize }}
  22.         {% endif %}
  23.         <span class="product-price{% if isListPrice and not displayFrom %} with-list-price{% endif %}">
  24.             {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  25.             {% if isListPrice and not displayFrom %}
  26.                 {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  27.                 {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  28.                 {% set hideStrikeTrough = beforeListPriceSnippetExists or afterListPriceSnippetExists %}
  29.                 <span class="list-price{% 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.listPrice.price|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.percentage })|sw_sanitize }}</span>
  34.                 </span>
  35.             {% endif %}
  36.         </span>
  37.         {% if weight %}
  38.             <span class="product-weight">({{ weight * 1000 }} g)</span>
  39.         {% endif %}
  40.         {% if isRegulationPrice %}
  41.             <span class="product-price with-regulation-price">
  42.                 {% if isListPrice %}<br/>{% endif %}<span
  43.                         class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</span>
  44.             </span>
  45.         {% endif %}
  46.     </div>
  47. {% endblock %}