vendor/shopware/storefront/Resources/views/storefront/page/product-detail/buy-widget.html.twig line 1

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