custom/plugins/KkTheme/src/Resources/views/storefront/component/product/card/box-standard.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/card/box-standard.html.twig' %}
  2. {# Attribute holen #}
  3. {% set attribut = product.translated.customFields %}
  4. {% block component_product_box_info %}
  5.     <div class="product-info">
  6.       <div class="product-info-inner">
  7.         {% block component_product_box_rating %}
  8.             {% if config('core.listing.showReview') %}
  9.                 <div class="product-rating">
  10.                     {% if product.ratingAverage %}
  11.                         {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  12.                             points: product.ratingAverage,
  13.                             style: 'text-primary'
  14.                         } %}
  15.                     {% endif %}
  16.                 </div>
  17.             {% endif %}
  18.         {% endblock %}
  19.         {% block component_product_box_name %}
  20.             <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  21.                class="product-name"
  22.                title="{{ name }}">
  23.                 {{ name }}
  24.             </a>
  25.         {% endblock %}
  26.         {% block component_product_box_description %}
  27.           <div class="product-description-outer">
  28.             <div class="product-description">
  29.                 {% sw_include '@Storefront/storefront/component/product/card/merkmale.html.twig' with {
  30.                     "product": product
  31.                 } %}
  32.             </div>
  33.           <div class="description-button"><span class="show-description-button">{% sw_icon 'arrow-move-horizontal-axis' %}</span></div>
  34.           </div>
  35.           
  36.           </div> {# description inner end #}
  37.         {% endblock %}
  38.     
  39.         {% block component_product_box_variant_characteristics %}
  40.             {{ parent() }}
  41.         {% endblock %}
  42.         {% set purchaseUnit = product.purchaseUnit %}
  43.         {% set listingPrice = product.calculatedListingPrice %}
  44.         {% set fromPrice = listingPrice.from %}
  45.         {% set cheapest = product.calculatedCheapestPrice %}
  46.         {% set real = product.calculatedPrice %}
  47.         {% if product.calculatedPrices.count > 0 %}
  48.             {% set real = product.calculatedPrices.last %}
  49.         {% endif %}
  50.         {% set referencePrice = real.referencePrice %}
  51.         {% set displayFrom = product.calculatedPrices.count > 1 %}
  52.         {% set price = real %}
  53.         {% set isListPrice = price.listPrice.percentage > 0 %}
  54.         {% set isRegulationPrice = price.regulationPrice != null %}
  55.         {% if product.extensions["groups"].elements[0].options.elements and product.extensions["groups"].elements[0].options.elements|length > 0 %}
  56.             {% set variationCount = product.extensions["groups"].elements[0].options.elements|length %}
  57.         {% else %}
  58.             {% set variationCount = "" %}
  59.         {% endif %}
  60.         
  61.         {% if product.cheapestPrice.variantId is not empty %}
  62.             {% set varId = product.cheapestPrice.variantId %}
  63.         {% else %}
  64.             {% set varId = id %}
  65.         {% endif %}
  66.         {% if cheapest.unitPrice != real.unitPrice %}
  67.         <div class="product-cheapest-price {% if isListPrice and price.regulationPrice.price and not displayFrom %} with-list-price{% endif %}{% if isRegulationPrice and displayFrom %} with-regulation-price{% endif %}">
  68.             {% if cheapest.unitPrice != real.unitPrice %}
  69.                 <div class="variation-from-price"><a title="{{ 'detail.cheapestVariationLink'|trans|sw_sanitize }}" href="{{ seoUrl('frontend.detail.page', {'productId': varId}) }}">{%if variationCount is not empty %}{{ variationCount }} {% endif %}{{ "listing.cheapestPriceLabel"|trans|sw_sanitize }}</a> <span class="product-cheapest-price-price"> {{ cheapest.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}</span></div>
  70.             {% endif %}
  71.         </div>
  72.         {% endif %}
  73.         
  74.     </div>
  75.     <div class="variants-spacer-block"></div>
  76.     <div class="price-action-block">
  77.         {% block component_product_box_price %}
  78.             {% sw_include '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
  79.         {% endblock %}
  80.         {% block component_product_box_action %}
  81.             {% sw_include '@Storefront/storefront/component/product/card/action.html.twig' %}
  82.         {% endblock %}
  83.     </div>
  84.     
  85.     {# product.deliveryTime.translation('name') #}
  86.     {% sw_include '@Storefront/storefront/component/delivery-information.html.twig' %}
  87. {% endblock %}