vendor/crehler/arrangements/src/Resources/views/storefront/page/product-detail/index.html.twig line 1

Open in your IDE?
  1. {% sw_extends "@CrehlerMojeBambinoEngine/storefront/page/product-detail/index.html.twig" %}
  2. {% block page_product_detail_main %}
  3.     {% set isArrangement = page.product.extensions.arrangement ?? false %}
  4.     {% set isInspiration = page.product.extensions.inspiration ?? false %}
  5.     {% if isArrangement or isInspiration %}
  6.         {% set gridMedia = isArrangement ? "col-lg-12" : "col-lg-7" %}
  7.         {% set gridBuy = isArrangement ? "col-lg-12" : "col-lg-5" %}
  8.         {% set mediaItems = page.product.extensions.arrangement.media.media ?? page.product.extensions.inspiration.media.media %}
  9.         <div class="row product-detail-main {{ isArrangement ? "is--arrangement" : "is--inspiration" }}">
  10.             <div class="{{ gridMedia }} product-detail-media product-detail-arrangement-media">
  11.                 {% if mediaItems %}
  12.                     {% sw_include '@CrehlerArrangements/storefront/element/cms-element-image-gallery-arrangement.html.twig' with {
  13.                         'mediaItems': mediaItems,
  14.                         'zoom': false,
  15.                         'zoomModal': false,
  16.                         'displayMode': 'contain',
  17.                         'gutter': 5,
  18.                         'navigationArrows': 'inside',
  19.                         'navigationDots': 'inside',
  20.                         'galleryPosition': 'underneath',
  21.                         'isProduct': true,
  22.                         'fallbackImageTitle': page.product.translated.name,
  23.                         'startIndexThumbnails': page.product.extensions.arrangement.cover.position ??  page.product.extensions.inspiration.cover.position ,
  24.                         'startIndexSlider': page.product.extensions.arrangement.cover.position ?? page.product.extensions.inspiration.cover.position,
  25.                         'arrangementDots': page.product.extensions.arrangement.media.dots
  26.                     } %}
  27.                 {% endif %}
  28.             </div>
  29.             <div class="{{ gridBuy }} product-detail-arrangement-buy">
  30.                 {% sw_include '@CrehlerArrangements/storefront/page/product-detail/buy-widget-arrangement.html.twig' %}
  31.                 {% if isInspiration %}
  32.                     <div class="product-detail-tabs is--inspiration">
  33.                         {% sw_include '@CrehlerArrangements/storefront/page/product-detail/tabs-arrangement.html.twig' with {'additionalDescription': false} %}
  34.                     </div>
  35.                 {% endif %}
  36.             </div>
  37.         </div>
  38.     {% else %}
  39.         {{ parent() }}
  40.     {% endif %}
  41. {% endblock %}
  42. {% block page_product_detail_tabs %}
  43.     {% set isArrangement = page.product.extensions.arrangement ?? false %}
  44.     {% set isInspiration = page.product.extensions.inspiration ?? false %}
  45.     {% if isArrangement or isInspiration %}
  46.         <div class="product-detail-tabs{% if isInspiration and page.product.extensions.inspiration.translated.shortDescription is empty %} d-none{% endif %}">
  47.             {% sw_include '@CrehlerArrangements/storefront/page/product-detail/tabs-arrangement.html.twig' with {'additionalDescription': true} %}
  48.         </div>
  49.         <div class="product-detail-tabs product-detail-arrangement-items">
  50.             <div class="tab-pane">
  51.                 <div class="arrangement-list-product">
  52.                     <div class="card">
  53.                         <div class="card-body">
  54.                             <div class="cart-item cart-item-product cart-item-product-one">
  55.                                 <div class="row cart-item-row">
  56.                                     <div class="col-12 col-lg col-xl cart-item-info">
  57.                                         <div class="h3 mb-0">{{ "plugin.crehlerArrangements.productDetailTabs.valueSet"|trans|raw }}</div>
  58.                                     </div>
  59.                                     <div class="col-12 col-sm col-md cart-item-unit-price text-center text-sm-right d-block">
  60.                                         <p class="price-box">{{ page.product.calculatedPrice.unitPrice|currency }}</p>
  61.                                         <p class="notice-text">{{ "plugin.crehlerArrangements.productDetailTabs.notice"|trans|raw }}</p>
  62.                                     </div>
  63.                                     <div class="col-12 col-md-4 col-lg-3 cart-item-add">
  64.                                         {# @var product \Shopware\Core\Content\Product\SalesChannel\SalesChannelProductEntity #}
  65.                                         <form action="{{ path('frontend.checkout.line-item.add') }}"
  66.                                               id="buy-widget[{{ page.product.id }}]"
  67.                                               method="post"
  68.                                               class="buy-widget"
  69.                                               data-add-all-to-cart="true">
  70.                                             {{ sw_csrf('frontend.checkout.line-item.add') }}
  71.                                             <input type="hidden"
  72.                                                    name="redirectTo"
  73.                                                    value="frontend.cart.offcanvas"/>
  74.                                             <button class="btn btn-primary btn-block btn-buy"
  75.                                                     title="{{ "plugin.crehlerArrangements.productDetailTabs.buyAllButton"|trans }}"
  76.                                                     aria-label="Kup wszystko">
  77.                                                 <span class="label">{{ "plugin.crehlerArrangements.productDetailTabs.buyAllButton"|trans }}</span>
  78.                                                 {% sw_icon 'bag-add' %}
  79.                                             </button>
  80.                                         </form>
  81.                                     </div>
  82.                                     <div class="col-8"></div>
  83.                                     {% if context.extension('shoppingLists').elements|keys[0] %}
  84.                                         <div class="col-md-4 add-all-to-shopping-list-wrapper" style="margin-top: 15px; padding: 0;">
  85.                                             <a class="btn btn-primary btn-block btn-buy add-all-to-shopping-list"
  86.                                                     title="{{ "plugin.crehlerArrangements.productDetailTabs.buyAllButton"|trans }}"
  87.                                                     href="{{ seoUrl('frontend.shopping-list.page.addAll', { 'arrangementId': isArrangement.id,'shoppingListId': context.extension('shoppingLists').elements|keys[0] }) }}"
  88.                                                     aria-label="Dodaj wszystko do listy zakupowej">
  89.                                                 <span class="label">Dodaj wszystko do listy zakupowej</span>
  90.                                             </a>
  91.                                         </div>
  92.                                     {% endif %}
  93.                                 </div>
  94.                             </div>
  95.                         </div>
  96.                     </div>
  97.                 </div>
  98.             </div>
  99.         </div>
  100.         <div class="product-detail-tabs product-detail-arrangement-items">
  101.             <div class="tab-pane fade show "
  102.                  id="arrangement-tab-pane"
  103.                  role="tabpanel"
  104.                  aria-labelledby="description-tab">
  105.                 <div class="arrangement-list-product">
  106.                     <div class="h3">{{ "plugin.crehlerArrangements.productDetailTabs.listItemsHeadline"|trans|raw }}</div>
  107.                     {% block shopping_list_index_table_container %}
  108.                         <div class="card">
  109.                             <div class="card-body">
  110.                                 {% block shopping_list_index_table_items %}
  111.                                     {% if isArrangement %}
  112.                                         {% set products = page.product.extensions.arrangement.arrangementProducts %}
  113.                                     {% else %}
  114.                                         {% set products = page.product.extensions.inspiration.inspirationProducts %}
  115.                                     {% endif %}
  116.                                     {% for listItem in products %}
  117.                                         {% block shopping_list_index_table_item %}
  118.                                             {% sw_include '@CrehlerArrangements/storefront/page/product-detail/arrangement-products-list/arrangement-products-list-item.html.twig' with {
  119.                                                 lineItem: listItem
  120.                                             } %}
  121.                                         {% endblock %}
  122.                                     {% endfor %}
  123.                                 {% endblock %}
  124.                             </div>
  125.                         </div>
  126.                     {% endblock %}
  127.                 </div>
  128.             </div>
  129.         </div>
  130.     {% else %}
  131.         {{ parent() }}
  132.     {% endif %}
  133. {% endblock %}