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 data-bs-toggle="tab"
  119.                                    class="product-detail-reviews-link"
  120.                                    data-offcanvas-tabs="true"
  121.                                    data-remote-click="true"
  122.                                    data-remote-click-options='{{ remoteClickOptions|json_encode }}'
  123.                                    href="#review-tab-pane"
  124.                                    aria-controls="review-tab-pane">
  125.                                     {{ page.reviews.totalReviews }}
  126.                                     {{ "detail.reviewLinkText"|trans({'%count%': page.reviews.totalReviews})|sw_sanitize }}
  127.                                 </a>
  128.                             </div>
  129.                         {% endif %}
  130.                     {% endblock %}
  131.                     {% block page_product_detail_delivery_informations %}
  132.                         <div class="product-detail-delivery-information">
  133.                             {% sw_include '@Storefront/storefront/component/delivery-information.html.twig' %}
  134.                         </div>
  135.                     {% endblock %}
  136.                 {% endblock %}
  137.                 {% block page_product_detail_configurator_include %}
  138.                     {% if page.product.parentId and page.configuratorSettings|length > 0 %}
  139.                         <div class="product-detail-configurator-container">
  140.                             {% sw_include '@Storefront/storefront/page/product-detail/configurator.html.twig' %}
  141.                         </div>
  142.                     {% endif %}
  143.                 {% endblock %}
  144.                 {% block page_product_detail_buy_form %}
  145.                     {% if page.product.active %}
  146.                         <div class="product-detail-form-container">
  147.                             {% sw_include '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' %}
  148.                         </div>
  149.                     {% endif %}
  150.                 {% endblock %}
  151.             </div>
  152.         {% endblock %}
  153.         {% if config('core.cart.wishlistEnabled') %}
  154.             {% block page_product_detail_wishlist %}
  155.                 {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  156.                     showText: true,
  157.                     size: 'md',
  158.                     productId: page.product.id
  159.                 } %}
  160.             {% endblock %}
  161.         {% endif %}
  162.         {% block page_product_detail_ordernumber_container %}
  163.             {% if page.product.productNumber %}
  164.                 <div class="product-detail-ordernumber-container">
  165.                     {% block page_product_detail_ordernumber_label %}
  166.                         <span class="product-detail-ordernumber-label">
  167.                             {{ "detail.productNumberLabel"|trans|sw_sanitize }}
  168.                         </span>
  169.                     {% endblock %}
  170.                     {% block page_product_detail_ordernumber %}
  171.                         <meta itemprop="productID"
  172.                               content="{{ page.product.id }}"/>
  173.                         <span class="product-detail-ordernumber"
  174.                               itemprop="sku">
  175.                             {{ page.product.productNumber }}
  176.                         </span>
  177.                     {% endblock %}
  178.                 </div>
  179.             {% endif %}
  180.         {% endblock %}
  181.     </div>
  182. {% endblock %}