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.     <div>
  3.         {% block component_product_detail_block_price_content %}
  4.             {% if price.listprice and price.listPrice.percentage > 0 %}
  5.                 <div class="product-detail-price{% if price %} with-advanced-list-price{% endif %}">{{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}</div>
  6.                 {% block component_product_detail_block_list_price_wrapper %}
  7.                     {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  8.                     {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  9.                     <span class="product-detail-advanced-list-price-wrapper{% if beforeListPriceSnippetExists or afterListPriceSnippetExists %} product-detail-advanced-list-price-wrapper-no-line-through{% endif %}">
  10.                         {% if beforeListPriceSnippetExists %}{{ "listing.beforeListPrice"|trans }}{% endif %}
  11.                         <span class="list-price-price">{{ price.listprice.price|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  12.                         {% if afterListPriceSnippetExists %}{{ "listing.afterListPrice"|trans }}{% endif %}
  13.                         <span class="list-price-percentage">{{ "detail.listPricePercentage"|trans({'%price%': price.listPrice.percentage })|sw_sanitize }}</span>
  14.                     </span>
  15.                 {% endblock %}
  16.             {% else %}
  17.                 {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  18.             {% endif %}
  19.         {% endblock %}
  20.     </div>
  21. {% endblock %}