custom/plugins/EmovaWbTheme/src/Resources/views/storefront/component/product/card/price-unit.html.twig line 1

Open in your IDE?
  1. {% block component_product_box_price_info %}
  2.     {# @deprecated tag:v6.5.0 - purchaseUnit will be removed, use product.purchaseUnit if needed #}
  3.     {% set purchaseUnit = product.purchaseUnit %}
  4.     {# @deprecated tag:v6.5.0 - listingPrice will be removed without replacement, since it was removed from the product struct #}
  5.     {% set listingPrice = product.calculatedListingPrice %}
  6.     {# @deprecated tag:v6.5.0 - fromPrice will be removed without replacement #}
  7.     {% set fromPrice = listingPrice.from %}
  8.     {% set cheapest = product.calculatedCheapestPrice %}
  9.     {% set real = product.calculatedPrice %}
  10.     {% if product.calculatedPrices.count > 0 %}
  11.         {% set real = product.calculatedPrices.last %}
  12.     {% endif %}
  13.     {% set referencePrice = real.referencePrice %}
  14.      {% set name = product.translated.name %}
  15.     {% set displayFrom = product.calculatedPrices.count > 1 %}
  16.     {% set displayParent = product.variantListingConfig.displayParent and product.parentId === null %}
  17.     {% if displayParent %}
  18.         {% set displayFromVariants = displayParent and real.unitPrice !== cheapest.unitPrice %}
  19.         {% set real = cheapest %}
  20.     {% endif %}
  21.     <div class="product-price-info" style="margin-top: 0px;">
  22.        
  23.        
  24.         {# {% block component_product_box_price_unit %}
  25.             <p class="product-price-unit">
  26.                 {% block component_product_box_price_purchase_unit %}
  27.                     {% if referencePrice and referencePrice.unitName %}
  28.                         <span class="product-unit-label">
  29.                             {{ "listing.boxUnitLabel"|trans|sw_sanitize }}
  30.                         </span>
  31.                         <span class="price-unit-content">
  32.                             {{ referencePrice.purchaseUnit }} {{ referencePrice.unitName }}
  33.                         </span>
  34.                     {% endif %}
  35.                 {% endblock %}
  36.                 {% block component_product_box_price_reference_unit %}
  37.                     {% if referencePrice is not null %}
  38.                         <span class="price-unit-reference">
  39.                             ({{ referencePrice.price|currency }} / {{ referencePrice.referenceUnit }} {{ referencePrice.unitName }})
  40.                         </span>
  41.                     {% endif %}
  42.                 {% endblock %}
  43.             </p>
  44.         {% endblock %} #}
  45.         {% block component_product_box_price %}
  46.             <div class="product-price-wrapper">
  47.                 {% set price = real %}
  48.                     {% set calcedTax = (price.calculatedTaxes.elements|first) %}
  49.                     {% set tax = calcedTax.tax %}
  50.                 {% set isListPrice = price.listPrice.percentage > 0 %}
  51.                 {% set isRegulationPrice = price.regulationPrice != null %}                  
  52.                
  53.                
  54.                 <div class="almarenaRegular" style="width:100%; color:black; display:flex; font-size:20px;">               
  55.                     <div class="width-50">
  56.                          (netto)
  57.                     </div>                           
  58.                     <div class="width-50" style="text-align: end;">
  59.                            {{ (price.totalPrice-tax)|currency(decimals=2) }}
  60.                     </div>
  61.                 </div>
  62.                  <div class="almarenaBold" style="width:100%; color:black; display:flex; font-size:20px">               
  63.                     <div class="width-50">
  64.                          Gesamtpreis
  65.                     </div>                           
  66.                     <div class="width-50" style="text-align: end;">
  67.                           {{ (price.totalPrice)|currency(decimals=2) }}
  68.                     </div>
  69.                 </div>
  70. {#
  71.                 <div class="product-cheapest-price{% if isListPrice and isRegulationPrice and not displayFrom and not displayFromVariants %} with-list-price{% endif %}{% if isRegulationPrice and not displayFrom and displayFromVariants %} with-regulation-price{% endif %}{% if displayFrom and isRegulationPrice %} with-from-price{% endif %}">
  72.                     {% if cheapest.unitPrice != real.unitPrice %}
  73.                         <div>{{ "listing.cheapestPriceLabel"|trans|sw_sanitize }}<span class="product-cheapest-price-price"> {{ cheapest.unitPrice|currency }}</span></div>
  74.                     {% endif %}
  75.                 </div>
  76. #}
  77.                 {# {% if displayFrom or (displayParent and displayFromVariants) %}
  78.                     {{ "listing.listingTextFrom"|trans|sw_sanitize }}
  79.                 {% endif %}
  80.                 <span class="product-price{% if isListPrice and not displayFrom and not displayFromVariants %} with-list-price{% endif %}">
  81.                     {% if isListPrice and not displayFrom and not displayFromVariants %}
  82.                         {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  83.                         {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  84.                         {% set hideStrikeTrough = beforeListPriceSnippetExists or afterListPriceSnippetExists %}
  85.                         <span class="list-price{% if hideStrikeTrough %} list-price-no-line-through{% endif %}">
  86.                             {% if beforeListPriceSnippetExists %}{{ "listing.beforeListPrice"|trans|trim|sw_sanitize }}{% endif %}
  87.                             <span class="list-price-price">{{ price.listPrice.price|currency }}</span>
  88.                             {% if afterListPriceSnippetExists %}{{ "listing.afterListPrice"|trans|trim|sw_sanitize }}{% endif %}
  89.                             <span class="list-price-percentage">{{ "detail.listPricePercentage"|trans({'%price%': price.listPrice.percentage })|sw_sanitize }}</span>
  90.                         </span>
  91.                     {% endif %}
  92.                 </span> 
  93.                 <div>
  94.                 </div> #}
  95.                 {# {% if isRegulationPrice %}
  96.                     <span class="product-price with-regulation-price">
  97.                         {% if isListPrice %}<br/>{% endif %}<span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}</span>
  98.                     </span>
  99.                 {% endif %} #}
  100.             </div>
  101.         {% endblock %} 
  102.     </div>
  103. {% endblock %}
  104. <style>
  105.     .width-50{
  106.         width: 50%;
  107.     }
  108.     .font-size32{
  109.         font-size: 32px;
  110.     }
  111.     .font-size25{
  112.         font-size: 25px;
  113.     }
  114.     .font-size16{
  115.         font-size: 16px;
  116.     }
  117.     .font-size14{
  118.         font-size: 14px;
  119.     }
  120.     .font-weight-bold{
  121.         font-weight: bold;
  122.     }  
  123. </style>