custom/plugins/Tuerschild_2/src/Resources/views/storefront/page/product-detail/index.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %}
  2. {% block page_product_detail_buy %}
  3.     <div class="col-lg-5 position-relative">
  4.         <div class="product-detail-buy-box">
  5.             <div><h1 class="product-detail-name"
  6.                      itemprop="name">
  7.                     {{ page.product.translated.name }}
  8.                     {% if page.product.calculatedCheapestPrice.listPrice.percentage %}
  9.                         <span class="badge badge-danger">
  10.                     {{ "detail.listPricePercentage"|trans({'%price%': page.product.calculatedCheapestPrice.listPrice.percentage|round })|sw_sanitize }}
  11.                 </span>
  12.                     {% endif %}
  13.                 </h1>
  14.             </div>
  15.             <div class="product-detail-review-wrapper">
  16.                 {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  17.                     points: page.product.ratingAverage,
  18.                     style: 'text-primary'
  19.                 } %}
  20.                 ( {{ page.reviews.total }} )
  21.             </div>
  22.             <div class="product-detail-buy">
  23.                 {% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
  24.             </div>
  25.             <div class="row align-items-center product-detail-actions mx-0">
  26.                 <div class="col-12 col-sm-4 d-flex align-items-center  justify-content-sm-end">
  27.                     <div class="text-right product-detail-action">
  28.                         {% block component_product_wishlist %}
  29.                             {% set addToWishlistOptions = {
  30.                                 productId: page.product.id,
  31.                                 router: {
  32.                                     add: {
  33.                                         afterLoginPath: path('frontend.wishlist.add.after.login', { productId: page.product.id }),
  34.                                         path: path('frontend.wishlist.product.add', { productId: page.product.id }),
  35.                                         token: sw_csrf('frontend.wishlist.product.add', {"mode": "token"})
  36.                                     },
  37.                                     remove: {
  38.                                         path: path('frontend.wishlist.product.remove', { productId: page.product.id }),
  39.                                         token: sw_csrf('frontend.wishlist.product.remove', {"mode": "token"}),
  40.                                     }
  41.                                 }
  42.                             } %}
  43.                             {% set size = size ?? 'md' %}
  44.                             {% block component_product_wishlist_button %}
  45.                                 <button
  46.                                         class="product-wishlist-{{ productId }} product-wishlist-action{% if appearance == 'circle' %}-circle{% endif %} product-wishlist-not-added product-wishlist-loading"
  47.                                         title="{{ "listing.toggleWishlist"|trans|sw_sanitize }}"
  48.                                         data-add-to-wishlist="true"
  49.                                         data-add-to-wishlist-options="{{ addToWishlistOptions|json_encode }}"
  50.                                 >
  51.                                     {% block component_product_wishlist_icon %}
  52.                                         {% sw_icon 'heart-fill' style { 'class': 'wishlist icon-wishlist-added', 'size': size } %}
  53.                                         {% sw_icon 'heart' style {'class': 'wishlist icon-wishlist-not-added', 'size': size } %}
  54.                                     {% endblock %}
  55.                                 </button>
  56.                             {% endblock %}
  57.                         {% endblock %}
  58.                         <span>
  59.                         Auf Merkliste
  60.                     </span>
  61.                     </div>
  62.                 </div>
  63.             </div>
  64.             {% if page.product.calculatedPrices|length > 1 %}
  65.                 {% block page_product_detail_price_block %}
  66.                     <div class="product-block-prices">
  67.                         {% block page_product_detail_price_block_table %}
  68.                             <table class="table product-block-prices-grid">
  69.                                 {% block page_product_detail_price_block_table_head %}
  70.                                     <thead class="product-block-prices-head">
  71.                                     {% block page_product_detail_price_block_table_head_inner %}
  72.                                         <tr class="product-block-prices-row">
  73.                                             <th scope="col" class="product-block-prices-cell">
  74.                                             </th>
  75.                                             <th scope="col" class="product-block-prices-cell">
  76.                                                 {{ "detail.dataColumnPrice"|trans|sw_sanitize }}
  77.                                             </th>
  78.                                             {% if page.product.calculatedPrice.referencePrice %}
  79.                                                 <th scope="col" class="product-block-prices-cell">
  80.                                                     {{ "detail.dataColumnReferencePrice"|trans|sw_sanitize }}
  81.                                                 </th>
  82.                                             {% endif %}
  83.                                             <th scope="col" class="product-block-prices-cell">
  84.                                                 Rabatt
  85.                                             </th>
  86.                                         </tr>
  87.                                     {% endblock %}
  88.                                     </thead>
  89.                                 {% endblock %}
  90.                                 {% block page_product_detail_price_block_table_body %}
  91.                                     <tbody class="product-block-prices-body">
  92.                                     {% block page_product_detail_price_block_table_body_inner %}
  93.                                         {% for price in page.product.calculatedPrices %}
  94.                                             {% block page_product_detail_price_block_table_body_row %}
  95.                                                 <tr class="product-block-prices-row"
  96.                                                     itemprop="offers" itemscope
  97.                                                     itemtype="https://schema.org/Offer">
  98.                                                     {% block page_product_detail_price_block_table_body_cell_quantity %}
  99.                                                         <th scope="row"
  100.                                                             class="product-block-prices-cell product-block-prices-cell-thin">
  101.                                                             <meta itemprop="priceCurrency"
  102.                                                                   content="{{ page.header.activeCurrency.id }}"/>
  103.                                                             <meta itemprop="price" content="{{ price.unitPrice }}"/>
  104.                                                             <link itemprop="availability"
  105.                                                                   href="https://schema.org/InStock"/>
  106.                                                             {% if loop.last %}
  107.                                                                 {{ "detail.priceDataInfoFrom"|trans|sw_sanitize }}
  108.                                                                 <span class="product-block-prices-quantity">{{ price.quantity }}</span> {{ "detail.quantity"|trans|sw_sanitize }}
  109.                                                             {% else %}
  110.                                                                 {{ "detail.priceDataInfoUntil"|trans|sw_sanitize }}
  111.                                                                 <span class="product-block-prices-quantity">{{ price.quantity }}</span> {{ "detail.quantity"|trans|sw_sanitize }}
  112.                                                             {% endif %}
  113.                                                         </th>
  114.                                                     {% endblock %}
  115.                                                     {% block page_product_detail_price_block_table_body_cell_price %}
  116.                                                         <td class="product-block-prices-cell">
  117.                                                             {% sw_include '@Storefront/storefront/component/product/block-price.html.twig' with {
  118.                                                                 price: price
  119.                                                             } only %}
  120.                                                         </td>
  121.                                                     {% endblock %}
  122.                                                     {% block page_product_detail_price_block_table_body_cell_reference_price %}
  123.                                                         {% if price.referencePrice is not null %}
  124.                                                             <td class="product-block-prices-cell product-block-prices-cell-thin">
  125.                                                                 {{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}
  126.                                                                 / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}
  127.                                                             </td>
  128.                                                         {% endif %}
  129.                                                     {% endblock %}
  130.                                                     <td>
  131.                                                     </td>
  132.                                                 </tr>
  133.                                             {% endblock %}
  134.                                         {% endfor %}
  135.                                     {% endblock %}
  136.                                     </tbody>
  137.                                 {% endblock %}
  138.                             </table>
  139.                         {% endblock %}
  140.                     </div>
  141.                 {% endblock %}
  142.             {% endif %}
  143.         </div>
  144.     </div>
  145. {% endblock %}
  146. {% block page_product_detail_tabs %}
  147.     <div class="product-detail-tabs col-lg-7">
  148.         {% sw_include '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
  149.     </div>
  150. {% endblock %}
  151. {% block page_product_detail_media %}
  152.     <div class="col-lg-7 product-detail-media">
  153.         {% if page.product.media %}
  154.             {% sw_include '@Storefront/storefront/element/cms-element-image-gallery.html.twig' with {
  155.                 'mediaItems': mediaItems,
  156.                 'zoom': false,
  157.                 'zoomModal': true,
  158.                 'displayMode': 'contain',
  159.                 'gutter': 5,
  160.                 'minHeight': '430px',
  161.                 'navigationArrows': 'inside',
  162.                 'navigationDots': 'inside',
  163.                 'galleryPosition': 'left',
  164.                 'isProduct': true,
  165.                 'fallbackImageTitle': page.product.translated.name,
  166.                 'startIndexThumbnails': page.product.cover.position + 1,
  167.                 'startIndexSlider': page.product.cover.position + 1
  168.             } %}
  169.         {% endif %}
  170.     </div>
  171. {% endblock %}
  172. {% block page_product_detail_cross_selling %}
  173. {% endblock %}