custom/plugins/GrimmTheme/src/Resources/views/storefront/component/product/card/price-discount-amount.html.twig line 1

Open in your IDE?
  1. {% block product_discount_save_info %}
  2.     {% set uvp = product.translated.customFields.grimm_customFields_uvp %}
  3.     {% set isRequestOnly = product.translated.customFields.grimm_customfields_productRequest_only %}
  4.         {% if uvp and isRequestOnly == false %}
  5.             {% if context.taxState == "gross"%}
  6.                 {# convert uvp to gross  #}
  7.                 {% set uvp = (uvp * ((100 + product.tax.taxRate) / 100))|round(2) %}
  8.             {% endif  %}
  9.             {% set discount = 0 %}
  10.             {% if product.calculatedPrice.unitPrice %}
  11.                 {% set discount = uvp - product.calculatedPrice.unitPrice %}
  12.             {% endif %}
  13.             {% if discount > 0 and 'product.save' %}
  14.                 <span class="product-box__price-discount">{{ "product.save"|trans|sw_sanitize }}{{ discount|currency }}</span>
  15.             {% endif %}
  16.         {% endif %}
  17. {% endblock %}