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

Open in your IDE?
  1. {% block page_product_detail_buy_inner %}
  2.     <div class="js-magnifier-zoom-image-container">
  3.         {% block page_product_detail_rich_snippets %}
  4.             {% block page_product_detail_rich_snippets_brand %}
  5.                 {% if page.product.manufacturer %}
  6.                     <meta itemprop="brand"
  7.                           content="{{ page.product.manufacturer.translated.name }}"/>
  8.                 {% endif %}
  9.             {% endblock %}
  10.             {% block page_product_detail_rich_snippets_gtin13 %}
  11.                 {% if page.product.ean %}
  12.                     <meta itemprop="gtin13"
  13.                           content="{{ page.product.ean }}"/>
  14.                 {% endif %}
  15.             {% endblock %}
  16.             {% block page_product_detail_rich_snippets_mpn %}
  17.                 {% if page.product.manufacturerNumber %}
  18.                     <meta itemprop="mpn"
  19.                           content="{{ page.product.manufacturerNumber }}"/>
  20.                 {% endif %}
  21.             {% endblock %}
  22.             {% block page_product_detail_rich_snippets_weight %}
  23.                 {% if page.product.weight %}
  24.                     <meta itemprop="weight"
  25.                           content="{{ page.product.weight }} kg"/>
  26.                 {% endif %}
  27.             {% endblock %}
  28.             {% block page_product_detail_rich_snippets_height %}
  29.                 {% if page.product.height %}
  30.                     <meta itemprop="height"
  31.                           content="{{ page.product.height }} mm"/>
  32.                 {% endif %}
  33.             {% endblock %}
  34.             {% block page_product_detail_rich_snippets_width %}
  35.                 {% if page.product.width %}
  36.                     <meta itemprop="width"
  37.                           content="{{ page.product.width }} mm"/>
  38.                 {% endif %}
  39.             {% endblock %}
  40.             {% block page_product_detail_rich_snippets_depth %}
  41.                 {% if page.product.length %}
  42.                     <meta itemprop="depth"
  43.                           content="{{ page.product.length }} mm"/>
  44.                 {% endif %}
  45.             {% endblock %}
  46.             {% block page_product_detail_rich_snippets_release_date %}
  47.                 <meta itemprop="releaseDate"
  48.                       content="{{ page.product.releaseDate|format_date(pattern="Y-MM-dd", locale=app.request.locale) }}"/>
  49.             {% endblock %}
  50.         {% endblock %}
  51.         {% if not feature('FEATURE_NEXT_16992') %}
  52.             {# @deprecated tag:v6.5.0 tag:)(FEATURE_NEXT_16992) - Block will be removed in v6.5.0 #}
  53.             {% block page_product_detail_not_available %}
  54.             {% endblock %}
  55.         {% endif %}
  56.         {% block page_product_detail_buy_container %}
  57.             <div itemprop="offers"
  58.                  itemscope
  59.                  itemtype="{% if page.product.calculatedPrices|length > 1 %}http://schema.org/AggregateOffer{% else %}http://schema.org/Offer{% endif %}">
  60.                 {% block page_product_detail_data %}
  61.                     {% block page_product_detail_data_rich_snippet_url %}
  62.                         <meta itemprop="url"
  63.                               content="{{ seoUrl('frontend.detail.page', { productId: page.product.id }) }}"/>
  64.                     {% endblock %}
  65.                     {% block page_product_detail_data_rich_snippet_price_range %}
  66.                         {% if page.product.calculatedPrices|length > 1 %}
  67.                             {% set lowestPrice = false %}
  68.                             {% set highestPrice = false %}
  69.                             {% for price in page.product.calculatedPrices %}
  70.                                 {% if not lowestPrice or price.unitPrice < lowestPrice %}
  71.                                     {% set lowestPrice = price.unitPrice %}
  72.                                 {% endif %}
  73.                                 {% if not highestPrice or price.unitPrice > highestPrice %}
  74.                                     {% set highestPrice = price.unitPrice %}
  75.                                 {% endif %}
  76.                             {% endfor %}
  77.                             <meta itemprop="lowPrice" content="{{ lowestPrice }}"/>
  78.                             <meta itemprop="highPrice" content="{{ highestPrice }}"/>
  79.                             <meta itemprop="offerCount" content="{{ page.product.calculatedPrices|length }}"/>
  80.                         {% endif %}
  81.                     {% endblock %}
  82.                     {% block page_product_detail_data_rich_snippet_price_currency %}
  83.                         <meta itemprop="priceCurrency"
  84.                               content="{{ context.currency.translated.shortName }}"/>
  85.                     {% endblock %}
  86.                     {% block page_product_detail_price %}
  87.                         <div class="product-detail-price-container">
  88.                             {% sw_include '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}
  89.                         </div>
  90.                     {% endblock %}
  91.                     {% block page_product_detail_tax %}
  92.                         <div class="product-detail-tax-container">
  93.                             {% if context.taxState == "gross" %}
  94.                                 {% set taxText = "general.grossTaxInformation"|trans|sw_sanitize %}
  95.                             {% else %}
  96.                                 {% set taxText = "general.netTaxInformation"|trans|sw_sanitize %}
  97.                             {% endif %}
  98.                             <p class="product-detail-tax">
  99.                                 {% block page_product_detail_tax_link %}
  100.                                     <a class="product-detail-tax-link"
  101.                                        href="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}"
  102.                                        title="{{ taxText }}"
  103.                                        data-toggle="modal"
  104.                                        data-url="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}">
  105.                                         {{ taxText }}
  106.                                     </a>
  107.                                 {% endblock %}
  108.                             </p>
  109.                         </div>
  110.                     {% endblock %}
  111.                     {% set remoteClickOptions = {
  112.                         selector: "#review-tab",
  113.                         scrollToElement: true
  114.                     } %}
  115.                     {% block page_product_detail_reviews %}
  116.                         {% if page.product.ratingAverage > 0 and page.reviews.totalReviews > 0 and config('core.listing.showReview') %}
  117.                             <div class="product-detail-reviews">
  118.                                 {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  119.                                     points: page.product.ratingAverage,
  120.                                     style: 'text-primary'
  121.                                 } %}
  122.                                 <a data-toggle="tab"
  123.                                    class="product-detail-reviews-link"
  124.                                    data-offcanvas-tabs="true"
  125.                                    data-remote-click="true"
  126.                                    data-remote-click-options='{{ remoteClickOptions|json_encode }}'
  127.                                    href="#review-tab-pane"
  128.                                    aria-controls="review-tab-pane">
  129.                                     {{ page.reviews.totalReviews }}
  130.                                     {{ "detail.reviewLinkText"|trans({'%count%': page.reviews.totalReviews})|sw_sanitize }}
  131.                                 </a>
  132.                             </div>
  133.                         {% endif %}
  134.                     {% endblock %}
  135.                     {% block page_product_detail_delivery_informations %}
  136.                         <div class="product-detail-delivery-information">
  137.                             {% sw_include '@Storefront/storefront/component/delivery-information.html.twig' %}
  138.                         </div>
  139.                     {% endblock %}
  140.                 {% endblock %}
  141.                 {% block page_product_detail_configurator_include %}
  142.                     {% if page.product.parentId and page.configuratorSettings|length > 0 %}
  143.                         <div class="product-detail-configurator-container">
  144.                             {% sw_include '@Storefront/storefront/page/product-detail/configurator.html.twig' %}
  145.                         </div>
  146.                     {% endif %}
  147.                 {% endblock %}
  148.                 {% block page_product_detail_buy_form %}
  149.                     {% if page.product.active %}
  150.                         <div class="product-detail-form-container">
  151.                             {% sw_include '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' %}
  152.                         </div>
  153.                     {% endif %}
  154.                 {% endblock %}
  155.             </div>
  156.         {% endblock %}
  157.         {% if config('core.cart.wishlistEnabled') %}
  158.             {% block page_product_detail_wishlist %}
  159.                 {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  160.                     showText: true,
  161.                     size: 'md',
  162.                     productId: page.product.id
  163.                 } %}
  164.             {% endblock %}
  165.         {% endif %}
  166.         {% block page_product_detail_ordernumber_container %}
  167.             {% if page.product.productNumber %}
  168.                 <div class="product-detail-ordernumber-container">
  169.                     {% block page_product_detail_ordernumber_label %}
  170.                         <span class="product-detail-ordernumber-label">
  171.                             {{ "detail.productNumberLabel"|trans|sw_sanitize }}
  172.                         </span>
  173.                     {% endblock %}
  174.                     {% block page_product_detail_ordernumber %}
  175.                         <meta itemprop="productID"
  176.                               content="{{ page.product.id }}"/>
  177.                         <span class="product-detail-ordernumber"
  178.                               itemprop="sku">
  179.                             {{ page.product.productNumber }}
  180.                         </span>
  181.                     {% endblock %}
  182.                 </div>
  183.             {% endif %}
  184.         {% endblock %}
  185.     </div>
  186. {% endblock %}