vendor/shopware/storefront/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.                     <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.         {% if not feature('FEATURE_NEXT_16992') %}
  53.             {# @deprecated tag:v6.5.0 tag:)(FEATURE_NEXT_16992) - Block will be removed in v6.5.0 #}
  54.             {% block page_product_detail_not_available %}
  55.             {% endblock %}
  56.         {% endif %}
  57.         {% block page_product_detail_buy_container %}
  58.             <div itemprop="offers"
  59.                  itemscope
  60.                  itemtype="{% if page.product.calculatedPrices|length > 1 %}http://schema.org/AggregateOffer{% else %}http://schema.org/Offer{% endif %}">
  61.                 {% block page_product_detail_data %}
  62.                     {% block page_product_detail_data_rich_snippet_url %}
  63.                         <meta itemprop="url"
  64.                               content="{{ seoUrl('frontend.detail.page', { productId: page.product.id }) }}"/>
  65.                     {% endblock %}
  66.                     {% block page_product_detail_data_rich_snippet_price_range %}
  67.                         {% if page.product.calculatedPrices|length > 1 %}
  68.                             {% set lowestPrice = false %}
  69.                             {% set highestPrice = false %}
  70.                             {% for price in page.product.calculatedPrices %}
  71.                                 {% if not lowestPrice or price.unitPrice < lowestPrice %}
  72.                                     {% set lowestPrice = price.unitPrice %}
  73.                                 {% endif %}
  74.                                 {% if not highestPrice or price.unitPrice > highestPrice %}
  75.                                     {% set highestPrice = price.unitPrice %}
  76.                                 {% endif %}
  77.                             {% endfor %}
  78.                             <meta itemprop="lowPrice" content="{{ lowestPrice }}"/>
  79.                             <meta itemprop="highPrice" content="{{ highestPrice }}"/>
  80.                             <meta itemprop="offerCount" content="{{ page.product.calculatedPrices|length }}"/>
  81.                         {% endif %}
  82.                     {% endblock %}
  83.                     {% block page_product_detail_data_rich_snippet_price_currency %}
  84.                         <meta itemprop="priceCurrency"
  85.                               content="{{ context.currency.translated.shortName }}"/>
  86.                     {% endblock %}
  87.                     {% block page_product_detail_price %}
  88.                         <div class="product-detail-price-container">
  89.                             {% sw_include '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}
  90.                         </div>
  91.                     {% endblock %}
  92.                     {% block page_product_detail_tax %}
  93.                         <div class="product-detail-tax-container">
  94.                             {% if context.taxState == "gross" %}
  95.                                 {% set taxText = "general.grossTaxInformation"|trans|sw_sanitize %}
  96.                             {% else %}
  97.                                 {% set taxText = "general.netTaxInformation"|trans|sw_sanitize %}
  98.                             {% endif %}
  99.                             <p class="product-detail-tax">
  100.                                 {% block page_product_detail_tax_link %}
  101.                                     <a class="product-detail-tax-link"
  102.                                        href="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}"
  103.                                        title="{{ taxText }}"
  104.                                        {{ dataBsToggleAttr }}="modal"
  105.                                        data-url="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}">
  106.                                         {{ taxText }}
  107.                                     </a>
  108.                                 {% endblock %}
  109.                             </p>
  110.                         </div>
  111.                     {% endblock %}
  112.                     {% set remoteClickOptions = {
  113.                         selector: "#review-tab",
  114.                         scrollToElement: true
  115.                     } %}
  116.                     {% block page_product_detail_reviews %}
  117.                         {% if page.product.ratingAverage > 0 and page.reviews.totalReviews > 0 and config('core.listing.showReview') %}
  118.                             <div class="product-detail-reviews">
  119.                                 {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  120.                                     points: page.product.ratingAverage,
  121.                                     style: 'text-primary'
  122.                                 } %}
  123.                                 <a {{ dataBsToggleAttr }}="tab"
  124.                                    class="product-detail-reviews-link"
  125.                                    data-offcanvas-tabs="true"
  126.                                    data-remote-click="true"
  127.                                    data-remote-click-options='{{ remoteClickOptions|json_encode }}'
  128.                                    href="#review-tab-pane"
  129.                                    aria-controls="review-tab-pane">
  130.                                     {{ page.reviews.totalReviews }}
  131.                                     {{ "detail.reviewLinkText"|trans({'%count%': page.reviews.totalReviews})|sw_sanitize }}
  132.                                 </a>
  133.                             </div>
  134.                         {% endif %}
  135.                     {% endblock %}
  136.                     {% block page_product_detail_delivery_informations %}
  137.                         <div class="product-detail-delivery-information">
  138.                             {% sw_include '@Storefront/storefront/component/delivery-information.html.twig' %}
  139.                         </div>
  140.                     {% endblock %}
  141.                 {% endblock %}
  142.                 {% block page_product_detail_configurator_include %}
  143.                     {% if page.product.parentId and page.configuratorSettings|length > 0 %}
  144.                         <div class="product-detail-configurator-container">
  145.                             {% sw_include '@Storefront/storefront/page/product-detail/configurator.html.twig' %}
  146.                         </div>
  147.                     {% endif %}
  148.                 {% endblock %}
  149.                 {% block page_product_detail_buy_form %}
  150.                     {% if page.product.active %}
  151.                         <div class="product-detail-form-container">
  152.                             {% sw_include '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' %}
  153.                         </div>
  154.                     {% endif %}
  155.                 {% endblock %}
  156.             </div>
  157.         {% endblock %}
  158.         {% if config('core.cart.wishlistEnabled') %}
  159.             {% block page_product_detail_wishlist %}
  160.                 {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  161.                     showText: true,
  162.                     size: 'md',
  163.                     productId: page.product.id
  164.                 } %}
  165.             {% endblock %}
  166.         {% endif %}
  167.         {% block page_product_detail_ordernumber_container %}
  168.             {% if page.product.productNumber %}
  169.                 <div class="product-detail-ordernumber-container">
  170.                     {% block page_product_detail_ordernumber_label %}
  171.                         <span class="product-detail-ordernumber-label">
  172.                             {{ "detail.productNumberLabel"|trans|sw_sanitize }}
  173.                         </span>
  174.                     {% endblock %}
  175.                     {% block page_product_detail_ordernumber %}
  176.                         <meta itemprop="productID"
  177.                               content="{{ page.product.id }}"/>
  178.                         <span class="product-detail-ordernumber"
  179.                               itemprop="sku">
  180.                             {{ page.product.productNumber }}
  181.                         </span>
  182.                     {% endblock %}
  183.                 </div>
  184.             {% endif %}
  185.         {% endblock %}
  186.     </div>
  187. {% endblock %}