custom/plugins/FourtwosixThemeExtension/src/Resources/views/storefront/page/product-detail/buy-widget-price.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}
  2. {% block page_product_detail_price_content %}
  3.     {% set listPrice = price.listPrice %}
  4.     {% set isListPrice = listPrice.percentage > 0 %}
  5.     {% set isRegulationPrice = price.regulationPrice != null %}
  6.     {% set purchaseUnit = page.product.purchaseUnit %}
  7.     {% set productUnitAkeneoKey = page.product.unit.translated.customFields["akeneo_key"] %}
  8.     {% set enableUnitConversion =  productUnitAkeneoKey !== "set" and productUnitAkeneoKey !== "box" and purchaseUnit !== 1.0 %}
  9.     {% set isDiscounted = listPrice.discount < 0 %}
  10.     {# @fourtwosix-edit: FV: imported custom fields value #}
  11.     {% set showPrice = page.product.translated.customFields['akeneo_statusinshoppreiszeigen']  ?? true %}
  12.     {# @fourtwosix-edit: FV: hide price if condition showPrice is false #}
  13.     {% if showPrice %}
  14.         <p class="product-detail-price
  15.             {% if isDiscounted and enableUnitConversion or not isDiscounted and not enableUnitConversion %} price-original-discount{% elseif not isDiscounted and enableUnitConversion %} price-original{% endif %}
  16.             {% if isListPrice %} with-list-price{% endif %}
  17.             {% if isRegulationPrice %} with-regulation-price{% endif %}">
  18.             {{ (page.product.calculatedPrice.totalprice)|currency }}
  19.             /
  20.             {% if enableUnitConversion %}
  21.                 {{ "fts.unit.box"|trans }}
  22.             {% else %}
  23.                 {{ page.product.unit.translated.name }}
  24.             {% endif %}
  25.             {{ "general.star"|trans|sw_sanitize }}
  26.         </p>
  27.         {% if isListPrice %}
  28.             {% block page_product_detail_was_price %}
  29.                 {{ block("page_product_detail_was_price_badge") }}
  30.                 {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  31.                 {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  32.                 {% block page_product_detail_was_price_wrapper %}{% endblock %}
  33.             {% endblock %}
  34.         {% endif %}
  35.         {% if isRegulationPrice %}
  36.             <span class="product-detail-list-price-wrapper">
  37.             <span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</span>
  38.         </span>
  39.         {% endif %}
  40.     {% endif %}
  41. {% endblock %}
  42. {% block page_product_detail_price_unit_reference_content %}{% endblock %}