custom/plugins/KkTheme/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.         {% if product.extensions["groups"].elements[0].options.elements and product.extensions["groups"].elements[0].options.elements|length > 0 %}
  8.             {% set variationCount = product.extensions["groups"].elements[0].options.elements|length %}
  9.         {% else %}
  10.             {% set variationCount = "" %}
  11.         {% endif %}
  12.         
  13.         {% if product.cheapestPrice.variantId is not empty %}
  14.             {% set varId = product.cheapestPrice.variantId %}
  15.         {% else %}
  16.             {% set varId = id %}
  17.         {% endif %}
  18.         {#
  19.         <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 %}">
  20.             {% if cheapest.unitPrice != real.unitPrice %}
  21.                 <div class="variation-from-price"><a title="{{ 'detail.cheapestVariationLink'|trans|sw_sanitize }}" href="{{ seoUrl('frontend.detail.page', {'productId': varId}) }}">{%if variationCount is not empty %}{{ variationCount }} {% endif %}{{ "listing.cheapestPriceLabel"|trans|sw_sanitize }}</a> <span class="product-cheapest-price-price"> {{ cheapest.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}</span></div>
  22.             {% endif %}
  23.         </div>
  24.         #}
  25.         {% if displayFrom %}
  26.             {# <a href="#" title="{{ "detail.staffelPreise"|trans|trim|sw_sanitize }}" class="category-price-table-link">{{ "listing.listingTextFrom"|trans|sw_sanitize }}</a> #}
  27.             <span class="category-price-table-link">{{ "listing.listingTextFrom"|trans|sw_sanitize }}</span>
  28.         {% endif %}
  29.         <span class="product-price{% if isListPrice and not displayFrom %} with-list-price{% endif %}">
  30.             {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  31.             {% if isListPrice and not displayFrom %}
  32.                 {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  33.                 {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  34.                 {% set hideStrikeTrough = beforeListPriceSnippetExists or afterListPriceSnippetExists %}
  35.                 <span class="list-price{% if hideStrikeTrough %} list-price-no-line-through{% endif %}">
  36.                     {% if beforeListPriceSnippetExists %}{{ "listing.beforeListPrice"|trans|trim|sw_sanitize }}{% endif %}
  37.                     <span class="list-price-price">{{ price.listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  38.                     {% if afterListPriceSnippetExists %}{{ "listing.afterListPrice"|trans|trim|sw_sanitize }}{% endif %}
  39.                     <span class="list-price-percentage">{{ "detail.listPricePercentage"|trans({'%price%': price.listPrice.percentage })|sw_sanitize }}</span>
  40.                 </span>
  41.             {% endif %}
  42.         </span>
  43.         {% if displayFrom %}
  44.             {# <span style="display: inline-block; margin-right: 0; margin-left: auto;">{{ detail.staffelPreise }}</span> #}
  45.             <a href="#" title="{{ "detail.staffelPreise"|trans|trim|sw_sanitize }}" 
  46.                 class="category-price-table-link">{% sw_icon 'eye-open' style{"size":"xs"} %} {{ "detail.staffelPreise"|trans|sw_sanitize }}</a>
  47.         {% endif %}
  48.         {% if isRegulationPrice %}
  49.             <span class="product-price with-regulation-price">
  50.                 {% if isListPrice %}<br/>{% endif %}<span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</span>
  51.             </span>
  52.         {% endif %}
  53.     </div>
  54.     
  55.         {% sw_include '@Storefront/storefront/component/product/card/price-table.html.twig' with {
  56.                                                             product: product,
  57.                                                             price: price
  58.         } %}
  59.     
  60. {% endblock %}