vendor/shopware/storefront/Resources/views/storefront/component/product/block-price.html.twig line 1

Open in your IDE?
  1. {% block component_product_detail_block_price %}
  2.     {% set isListPrice = price.listPrice.percentage > 0 %}
  3.     {% set isRegulationPrice = price.regulationPrice != null %}
  4.     <div>
  5.         {% block component_product_detail_block_price_content %}
  6.             {% if price.listprice and isListPrice %}
  7.                 <div class="product-detail-price{% if price %} with-advanced-list-price{% endif %}">{{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}</div>
  8.                 {% block component_product_detail_block_list_price_wrapper %}
  9.                     {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  10.                     {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  11.                     <span class="product-detail-advanced-list-price-wrapper{% if beforeListPriceSnippetExists or afterListPriceSnippetExists %} product-detail-advanced-list-price-wrapper-no-line-through{% endif %}">
  12.                         {% if beforeListPriceSnippetExists %}{{ "listing.beforeListPrice"|trans }}{% endif %}
  13.                         <span class="list-price-price">{{ price.listprice.price|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  14.                         {% if afterListPriceSnippetExists %}{{ "listing.afterListPrice"|trans }}{% endif %}
  15.                         <span class="list-price-percentage">{{ "detail.listPricePercentage"|trans({'%price%': price.listPrice.percentage })|sw_sanitize }}</span>
  16.                     </span>
  17.                 {% endblock %}
  18.             {% else %}
  19.                 {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  20.             {% endif %}
  21.             {% if isRegulationPrice %}
  22.                 <span class="product-detail-advanced-regulation-price-wrapper{% if isListPrice %} with-list-price{% endif %}">
  23.                     <span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</span>
  24.                 </span>
  25.             {% endif %}
  26.         {% endblock %}
  27.     </div>
  28. {% endblock %}