custom/plugins/HBCTheme/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. {# ----- delete price units ----- #}
  3. {% block component_product_box_price_unit %}
  4. {% endblock %}
  5. {% block component_product_box_price %}
  6.     <div class="product-price-wrapper">
  7.         {% if product.translated.customFields.custom_price_on_request_price_on_request %}
  8.             <span class="product-price">{{ "hbc.priceOnRequest"|trans|sw_sanitize }}</span>
  9.         {% else %}
  10.             {% set price = real %}
  11.             {% if displayFrom %}
  12.                 {{ "listing.listingTextFrom"|trans|sw_sanitize }}
  13.             {% endif %}
  14.             {% set isListPrice = price.listPrice.percentage > 0 %}
  15.             <span class="product-price{% if isListPrice and not displayFrom %} with-list-price{% endif %}">
  16.                {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  17.                 {% if isListPrice and not displayFrom %}
  18.                     {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  19.                     {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  20.                     {% set hideStrikeTrough = beforeListPriceSnippetExists or afterListPriceSnippetExists %}
  21.                  {#   <span class="list-price{% if hideStrikeTrough %} list-price-no-line-through{% endif %}">
  22.                         {% if beforeListPriceSnippetExists %}{{ "listing.beforeListPrice"|trans|trim|sw_sanitize }}{% endif %}
  23.                         <span class="list-price-price">{{ price.listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  24.                         {% if afterListPriceSnippetExists %}{{ "listing.afterListPrice"|trans|trim|sw_sanitize }}{% endif %}
  25.                         <span class="list-price-percentage">{{ "detail.listPricePercentage"|trans({'%price%': price.listPrice.percentage })|sw_sanitize }}</span>
  26.                     </span>#}
  27.                 {% endif %}
  28.             </span>
  29.         {% endif %}
  30.     </div>
  31. {% endblock %}