custom/static-plugins/NdTheme/src/Resources/views/storefront/component/buy-widget/buy-widget.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/buy-widget/buy-widget.html.twig' %}
  2. {% block buy_widget %}
  3.     <div class="product-detail-buy{% if elementId %}-{{ elementId }}{% endif %} js-magnifier-zoom-image-container boxed-layout py-10">
  4.         {% block buy_widget_rich_snippets %}
  5.             {{ parent() }}
  6.         {% endblock %}
  7.         {% if not feature('FEATURE_NEXT_16992') %}
  8.             {# @deprecated tag:v6.5.0 tag:)(FEATURE_NEXT_16992) - Block will be removed in v6.5.0 #}
  9.             {% block buy_widget_not_available %}
  10.             {% endblock %}
  11.         {% endif %}
  12.         {% block buy_widget_buy_container %}
  13.             <div itemprop="offers"
  14.                  itemscope
  15.                  itemtype="{% if product.calculatedPrices|length > 1 %}http://schema.org/AggregateOffer{% else %}http://schema.org/Offer{% endif %}">
  16.                 {% block buy_widget_data %}
  17.                     {% block buy_widget_data_rich_snippet_url %}
  18.                         {{ parent() }}
  19.                     {% endblock %}
  20.                     {% block buy_widget_data_rich_snippet_price_range %}
  21.                         {{ parent() }}
  22.                     {% endblock %}
  23.                     {% block buy_widget_data_rich_snippet_price_currency %}
  24.                         {{ parent() }}
  25.                     {% endblock %}
  26.                     {% block page_product_detail_brand %}
  27.                         {% if page.product.manufacturer %}
  28.                             <div class="product-detail-brand">
  29.                                 {{ page.product.manufacturer.translated.name }}
  30.                             </div>
  31.                         {% endif %}
  32.                     {% endblock %}
  33.                     {% block page_product_detail_headline %}
  34.                         <div class="product-detail-headline">
  35.                             {% sw_include '@Storefront/storefront/page/product-detail/headline.html.twig' %}
  36.                         </div>
  37.                     {% endblock %}
  38.                     {% block buy_widget_configurator_include %}
  39.                         {% if product.parentId and configuratorSettings|length > 0 %}
  40.                             <div class="product-detail-configurator-container">
  41.                                 {% sw_include '@Storefront/storefront/component/buy-widget/configurator.html.twig' %}
  42.                             </div>
  43.                         {% endif %}
  44.                     {% endblock %}
  45.                     {% block product_offcanvas_tabs %}
  46.                         {% sw_include '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
  47.                     {% endblock %}
  48.                     {% block buy_widget_price %}
  49.                         <div class="product-detail-price-container mt-4">
  50.                             {% sw_include '@Storefront/storefront/component/buy-widget/buy-widget-price.html.twig' %}
  51.                         </div>
  52.                     {% endblock %}
  53.                     {# @deprecated tag:v6.5.0 - Will be removed - The variable will be moved into block `buy_widget_reviews` #}
  54.                     {% set remoteClickOptions = {
  55.                         selector: "#review-tab-" ~ product.id,
  56.                         scrollToElement: true
  57.                     } %}
  58.                     {# @deprecated tag:v6.5.0 - Will be removed - The variable will be moved into block `buy_widget_reviews` #}
  59.                     {% set reviewTabHref = "#review-tab-" ~ product.id ~ "-pane" %}
  60.                     {% block buy_widget_reviews %}
  61.                         {% if product.ratingAverage > 0 and totalReviews > 0 and config('core.listing.showReview') %}
  62.                             {% if remoteClickOptions is not defined %}
  63.                                 {% set remoteClickOptions = {
  64.                                     selector: "#review-tab-" ~ product.id,
  65.                                     scrollToElement: true
  66.                                 } %}
  67.                             {% endif %}
  68.                             {% if reviewTabHref is not defined %}
  69.                                 {% set reviewTabHref = "#review-tab-" ~ product.id ~ "-pane" %}
  70.                             {% endif %}
  71.                             <div class="product-detail-reviews">
  72.                                 {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  73.                                     points: product.ratingAverage,
  74.                                     style: 'text-primary'
  75.                                 } %}
  76.                                 <a {{ dataBsToggleAttr }}="tab"
  77.                                 class="product-detail-reviews-link"
  78.                                 data-offcanvas-tabs="true"
  79.                                 data-remote-click="true"
  80.                                 data-remote-click-options='{{ remoteClickOptions|json_encode }}'
  81.                                 href="{{ reviewTabHref }}"
  82.                                 aria-controls="review-tab-pane">
  83.                                 {{ totalReviews }}
  84.                                 {{ "detail.reviewLinkText"|trans({'%count%': totalReviews})|sw_sanitize }}
  85.                                 </a>
  86.                             </div>
  87.                         {% endif %}
  88.                     {% endblock %}
  89.                     {% block buy_widget_delivery_informations %}
  90.                         <div class="product-detail-delivery-information">
  91.                             {% sw_include '@Storefront/storefront/component/delivery-information.html.twig' %}
  92.                         </div>
  93.                     {% endblock %}
  94.                 {% endblock %}
  95.                 {% block buy_widget_buy_form %}
  96.                     {% if product.active %}
  97.                         <div class="product-detail-form-container">
  98.                             {% sw_include '@Storefront/storefront/component/buy-widget/buy-widget-form.html.twig' %}
  99.                         </div>
  100.                     {% endif %}
  101.                 {% endblock %}
  102.                 {% block buy_widget_upsell_popup %}
  103.                     <section id="upsell-popup-container" data-upsell-popup="true"></section>
  104.                 {% endblock %}
  105.                 {% block buy_widget_usps %}
  106.                     {% set usps = [
  107.                         "company.headerCarousel_1",
  108.                         "company.headerCarousel_2",
  109.                         "company.headerCarousel_3"
  110.                     ] %}
  111.                     {% if usps %}
  112.                         <div class="product-detail-usps mt-6">
  113.                             <ul class="grid grid-gap-2">
  114.                                 {% for item in usps %}
  115.                                     <li class="product-detail-usp text-sm text-black-600">
  116.                                         {# TODO looks like the HERO icons pack is not accepted yet. Look at later. #}
  117.                                         {% sw_icon 'check' style{'pack': 'hero'} %}
  118.                                         {{ item|trans|raw }}
  119.                                     </li>
  120.                                 {% endfor %}
  121.                             </ul>
  122.                         </div>
  123.                     {% endif %}
  124.                 {% endblock %}
  125.             </div>
  126.         {% endblock %}
  127.     </div>
  128. {% endblock %}