custom/plugins/MDR_Theme/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. {% endblock %}
  4. {% block component_product_box_price %}
  5.     {% set listPrice = product.priceRange or product.calculatedPrices.count > 0 ? null : product.calculatedPrice.listPrice %}
  6.     <p class="product-price{% if listPrice.percentage > 0 %} with-list-price{% endif %}">
  7.         {% if
  8.             product.customFields.cnf_apto_connector_enable_apto
  9.         %}
  10.             <span class="product-price__prefix">{{ "listing.pricePrefix"|trans|sw_sanitize }}</span>
  11.         {% endif %}
  12.         {% if product.priceRange %}
  13.             {{ fromPrice.unitPrice|currency }}
  14.             -
  15.             {{ listingPrice.to.unitPrice|currency }}
  16.         {% elseif product.calculatedPrices|length == 1 %}
  17.             {{ product.calculatedPrices.first.unitPrice|currency }}
  18.         {% else %}
  19.             {{ product.calculatedPrice.unitPrice|currency }}
  20.             {% if listPrice.percentage > 0 %}
  21.                 <span class="list-price">
  22.                     {{ listPrice.price|currency }}
  23.                 </span>
  24.             {% endif %}
  25.         {% endif %}
  26.     </p>
  27. {% endblock %}