custom/plugins/ThemeOkeonline/src/Resources/views/storefront/component/product/card/versions/version-02/price-unit.html.twig line 1

Open in your IDE?
  1. {% extends '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
  2. {# Note: not all blocks have been included, please maintain block-structure while updating #}
  3.  {% block component_product_box_price_unit %}
  4.      
  5.  {% endblock %}
  6. {% block component_product_box_price %}
  7.     <div class="product-price-wrapper">
  8.         {% set price = real %}
  9.         {% set isListPrice = price.listPrice.percentage > 0 %}
  10.         {% set isRegulationPrice = price.regulationPrice != null %}
  11.         {% set showCheapestPrice = theme_config('productListingStylesProductBoxDisplayCheapestPrice') %}
  12.         {% set hasMultiplePrices = product.cheapestPriceContainer.default.child_count > 0 %}
  13.         {% set showingCheapestPrice = cheapest.unitPrice ? hasMultiplePrices and showCheapestPrice : false %}
  14.         {# "cheapest price" has been merged with the regular price, we're never showing both at once. #}
  15.         {#<div class="product-cheapest-price">
  16.             {% if cheapest.unitPrice %}
  17.                 <div>{{ "listing.cheapestPriceLabel"|trans|sw_sanitize }}<span class="product-cheapest-price-price"> {{ cheapest.unitPrice|currency }}</span></div>
  18.             {% endif %}
  19.         </div>#}
  20.         {% set isListPrice = price.listPrice.percentage > 0 %}
  21.         {# Reverse flex has been used to maintain the default hierarchy #}
  22.         <span class="product-price{% if isListPrice and not displayFrom %} with-list-price{% endif %} d-flex flex-row-reverse flex-wrap-reverse justify-content-end">
  23.             
  24.             {% block component_product_box_price_wrapper %}
  25.                 {% if showingCheapestPrice %}
  26.                     <div class="product-price-cheapest">{{ cheapest.unitPrice|currency }}</div>
  27.                 {% else %}
  28.                     <div class="product-price-unit-price">{{ price.unitPrice|currency }}</div>
  29.                 {% endif %}
  30.             {% endblock %}
  31.             {% block component_product_box_price_prefix_wrapper %}
  32.                 <div class="product-price-prefix">
  33.                     {% block component_product_box_price_prefix_content %}
  34.                         {% block component_product_box_price_has_children_prefix %}
  35.                             {% if showingCheapestPrice %}
  36.                                 <div class="product-price-from mr-2">
  37.                                      {{ "listing.listingTextFrom"|trans|sw_sanitize }}
  38.                                 </div>
  39.                             {% endif %}
  40.                         {% endblock %}
  41.                     {% endblock %}
  42.                 </div>
  43.             {% endblock %}
  44.             {% if isListPrice and not displayFrom %}
  45.                 {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  46.                 {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  47.                 {% set hideStrikeTrough = beforeListPriceSnippetExists or afterListPriceSnippetExists %}
  48.                 <span class="lp-price list-price{% if hideStrikeTrough %} list-price-line-through{% endif %} pr-2 pl-0">
  49.                     <span class="list-price-price">{{ price.listPrice.price|currency }}</span>
  50.                 </span>
  51.                 {% if theme_config('productListingStylesProductBoxDisplayPercentage') %}
  52.                     {% block component_product_box_price_percentage_wrapper %}
  53.                         <span class="lp-percentage list-price col-12 pr-0 pl-0">
  54.                             {% block component_product_box_price_percentage_content %}
  55.                                 <span class="list-price-percentage">{{ "oo.detail.listPricePercentage"|trans({'%price%': price.listPrice.percentage })|sw_sanitize }}</span>
  56.                             {% endblock %}
  57.                         </span>
  58.                     {% endblock %}
  59.                 {% endif %}
  60.             {% endif %}
  61.         </span>
  62.         {% if isRegulationPrice %}
  63.             <span class="product-price with-regulation-price">
  64.                 <span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}</span>
  65.             </span>
  66.         {% endif %}
  67.     </div>
  68. {% endblock %}