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="product-detail-buy 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.                 <meta itemprop="mpn"
  18.                       content="{{ page.product.productNumber }}"/>
  19.             {% endblock %}
  20.             {% block page_product_detail_rich_snippets_weight %}
  21.                 {% if page.product.weight %}
  22.                     <meta itemprop="weight"
  23.                           content="{{ page.product.weight }} kg"/>
  24.                 {% endif %}
  25.             {% endblock %}
  26.             {% block page_product_detail_rich_snippets_height %}
  27.                 {% if page.product.height %}
  28.                     <meta itemprop="height"
  29.                           content="{{ page.product.height }} mm"/>
  30.                 {% endif %}
  31.             {% endblock %}
  32.             {% block page_product_detail_rich_snippets_width %}
  33.                 {% if page.product.width %}
  34.                     <meta itemprop="width"
  35.                           content="{{ page.product.width }} mm"/>
  36.                 {% endif %}
  37.             {% endblock %}
  38.             {% block page_product_detail_rich_snippets_depth %}
  39.                 {% if page.product.length %}
  40.                     <meta itemprop="depth"
  41.                           content="{{ page.product.length }} mm"/>
  42.                 {% endif %}
  43.             {% endblock %}
  44.             {% block page_product_detail_rich_snippets_release_date %}
  45.                 <meta itemprop="releaseDate"
  46.                       content="{{ page.product.releaseDate|format_date('short', locale=app.request.locale) }}"/>
  47.             {% endblock %}
  48.         {% endblock %}
  49.         {% block page_product_detail_not_available %}
  50.             {#TODO: NEXT-2784 - product not available message#}
  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: shopware.config.core.basicInformation.shippingPaymentInfoPage }) }}"
  98.                                        title="{{ taxText }}"
  99.                                        data-toggle="modal"
  100.                                        data-url="{{ path('frontend.cms.page',{ id: shopware.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 shopware.config.detail.showReviews %}
  113.                             <p 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-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.                             </p>
  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.         {% block page_product_detail_ordernumber_container %}
  154.             {% if page.product.productNumber %}
  155.                 <div class="product-detail-ordernumber-container">
  156.                     {% block page_product_detail_ordernumber_label %}
  157.                         <span class="product-detail-ordernumber-label">
  158.                             {{ "detail.ordernumberLabel"|trans|sw_sanitize }}
  159.                         </span>
  160.                     {% endblock %}
  161.                     {% block page_product_detail_ordernumber %}
  162.                         <meta itemprop="productID"
  163.                               content="{{ page.product.id }}"/>
  164.                         <span class="product-detail-ordernumber"
  165.                               itemprop="sku">
  166.                             {{ page.product.productNumber }}
  167.                         </span>
  168.                     {% endblock %}
  169.                 </div>
  170.             {% endif %}
  171.         {% endblock %}
  172.     </div>
  173. {% endblock %}