templates/template-parts/price-box.html.twig line 1

Open in your IDE?
  1. {% if product.regular_price|default or product.sale_price|default or product.discount|default %}
  2.     <div class="hidden lg:flex flex-row items-center space-x-3 py-1 max-w-max min-w-[220px]">
  3.         {% if product.regular_price|default and product.sale_price|default %}<span
  4.             class="text-xs text-[#A3A3A3] line-through"
  5.             x-text="currentVariationRegularPrice('{{ afterPrice|default }}')">{{ product.regular_price|number_format(2,',','.')|replace({',00':''}) ~ '€' ~ afterPrice|default }}</span>
  6.             <span class="text-2xl text-black font-bold"
  7.                   x-text="currentVariationSalePrice('{{ afterPrice|default }}')">{{ product.sale_price|number_format(2,',','.')|replace({',00':''}) ~ '€' ~ afterPrice|default }}</span>
  8.             {% if product.discount|default %}
  9.                 <span class="w-max bg-secondary px-2 py-0.5 text-xs text-white font-bold"
  10.                       x-text="currentVariationDiscount()">{{ '- ' ~ product.discount ~ '%' }}</span>
  11.             {% endif %}
  12.         {% elseif product.regular_price|default %}
  13.             <span class="text-2xl text-black font-bold"
  14.                   x-text="currentVariationRegularPrice('{{ afterPrice|default }}')">{{ product.regular_price|number_format(2,',','.')|replace({',00':''}) ~ '€' ~ afterPrice|default }}</span>
  15.         {% endif %}
  16.     </div>
  17. {% endif %}