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.                         <span class="product-detail-price-container special-price">
  89.                             {% sw_include '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}
  90.                             <span class="product-detail-tax-container">
  91.                             {% if context.taxState == "gross" %}
  92.                                 {% set taxText = "general.grossTaxInformation"|trans|sw_sanitize %}
  93.                             {% else %}
  94.                                 {% set taxText = "general.netTaxInformation"|trans|sw_sanitize %}
  95.                             {% endif %}
  96.                             <span class="product-detail-tax">
  97.                                 {% block page_product_detail_tax_link %}
  98.                                     <a class="product-detail-tax-link"
  99.                                        href="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}"
  100.                                        title="{{ taxText }}"
  101.                                        {{ dataBsToggleAttr }}="modal"
  102.                                        data-url="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}">
  103.                                         {{ taxText }}
  104.                                     </a>
  105.                                 {% endblock %}
  106.                             </span>
  107.                         </span>
  108.                         </span>
  109.                     {% endblock %}
  110.                     {% block page_product_detail_tax %}
  111.                         
  112.                     {% endblock %}
  113.                     {% set remoteClickOptions = {
  114.                         selector: "#review-tab",
  115.                         scrollToElement: true
  116.                     } %}
  117.                     {% block page_product_detail_reviews %}
  118.                         {% if page.product.ratingAverage > 0 and page.reviews.totalReviews > 0 and config('core.listing.showReview') %}
  119.                             <div class="product-detail-reviews">
  120.                                 {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  121.                                     points: page.product.ratingAverage,
  122.                                     style: 'text-primary'
  123.                                 } %}
  124.                                 <a {{ dataBsToggleAttr }}="tab"
  125.                                    class="product-detail-reviews-link"
  126.                                    data-offcanvas-tabs="true"
  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.                                     {{ page.reviews.totalReviews }}
  132.                                     {{ "detail.reviewLinkText"|trans({'%count%': page.reviews.totalReviews})|sw_sanitize }}
  133.                                 </a>
  134.                             </div>
  135.                         {% endif %}
  136.                     {% endblock %}
  137.                     {% block page_product_detail_delivery_informations %}
  138.                         <div class="product-detail-delivery-information">
  139.                             {% sw_include '@Storefront/storefront/component/delivery-information.html.twig' %}
  140.                         </div>
  141.                     {% endblock %}
  142.                 {% endblock %}
  143.                 {% block page_product_detail_configurator_include %}
  144.                     {% if page.product.parentId and page.configuratorSettings|length > 0 %}
  145.                         <div class="product-detail-configurator-container">
  146.                             {% sw_include '@Storefront/storefront/page/product-detail/configurator.html.twig' %}
  147.                         </div>
  148.                     {% endif %}
  149.                 {% endblock %}
  150.                 {% block page_product_detail_buy_form %}
  151.                     {% if page.product.active %}
  152.                         <div class="product-detail-form-container">
  153.                             {% sw_include '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' %}
  154.                         </div>
  155.                     {% endif %}
  156.                 {% endblock %}
  157.             </div>
  158.         {% endblock %}
  159.         {% if config('core.cart.wishlistEnabled') %}
  160.             {% block page_product_detail_wishlist %}
  161.                 {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  162.                     showText: true,
  163.                     size: 'md',
  164.                     productId: page.product.id
  165.                 } %}
  166.             {% endblock %}
  167.         {% endif %}
  168.         {% block page_product_detail_ordernumber_container %}
  169.             {% if page.product.productNumber %}
  170.                 <div class="product-detail-ordernumber-container">
  171.                     {% block page_product_detail_ordernumber_label %}
  172.                         <span class="product-detail-ordernumber-label">
  173.                             {{ "detail.productNumberLabel"|trans|sw_sanitize }}
  174.                         </span>
  175.                     {% endblock %}
  176.                     {% block page_product_detail_ordernumber %}
  177.                         <meta itemprop="productID"
  178.                               content="{{ page.product.id }}"/>
  179.                         <span class="product-detail-ordernumber"
  180.                               itemprop="sku">
  181.                             {{ page.product.productNumber }}
  182.                         </span>
  183.                     {% endblock %}
  184.                 </div>
  185.             {% endif %}
  186.         {% endblock %}
  187.     </div>
  188. {% endblock %}