custom/plugins/IabTheme/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 is not null %}
  4.         <p class="product-price-unit">
  5.             {# Price is based on the purchase unit #}
  6.             {{ block('component_product_box_price_purchase_unit') }}
  7.             {# Item price is based on a reference unit #}
  8.             {{ block('component_product_box_price_reference_unit') }}
  9.         </p>
  10.     {% endif %}
  11. {% endblock %}
  12. {% block component_product_box_price %}
  13.     <div class="product-price-wrapper">
  14.         {% set price = real %}
  15.         {% set isListPrice = price.listPrice.percentage > 0 %}
  16.         {% set isRegulationPrice = price.regulationPrice != null %}
  17.         {% set loginCustomer = context.customer %}
  18.         {% set hidePrice = config('SprinixHidePrice.hidePrice.hidePrices') %}
  19.         {% if not(hidePrice) or (loginCustomer) %}
  20.             {% if cheapest.unitPrice != real.unitPrice %}
  21.                 <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 %}">
  22.                     <div>{{ "listing.cheapestPriceLabel"|trans|sw_sanitize }}<span class="product-cheapest-price-price"> {{ cheapest.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}</span></div>
  23.                 </div>
  24.             {% endif %}
  25.             {% if app.request.attributes.get('_route') != 'frontend.wishlist.page'
  26.                     and (displayFrom or (displayParent and displayFromVariants)) %}
  27.                 {{ "listing.listingTextFrom"|trans|sw_sanitize }}
  28.             {% endif %}
  29.             <span class="product-price{% if isListPrice and not displayFrom and not displayFromVariants %} with-list-price{% endif %}">
  30.                 {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  31.                 {% if isListPrice and not displayFrom and not displayFromVariants %}
  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 isRegulationPrice %}
  44.                 <span class="product-price with-regulation-price">
  45.                     {% if isListPrice %}<br/>{% endif %}<span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</span>
  46.                 </span>
  47.             {% endif %}
  48.         {% endif %}
  49.     </div>
  50. {% endblock %}