custom/plugins/b2bsellerscore/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.     {% set eventProductExtensionKey = constant('B2bEventManager\\Components\\Product\\Service\\EventProductExtensionService::PRODUCT_EVENT_EXTENSION') %}
  4.     <div class="col-lg-5 product-detail-buy">
  5.         {% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
  6.         {% set followUpArticle = page.extensions.b2bFollowUpArticle %}
  7.         {% if b2bPlatformConfig.enableFollowUpArticle and page.product.isCloseout or  b2bPlatformConfig.enableFollowUpArticle == false %}
  8.             {% if followUpArticle %}
  9.                 {% block follow_up_article %}
  10.                     <div class="follow-up-article">
  11.                         {% block follow_up_article_title %}
  12.                             <div class="title">
  13.                                 {{ "detail.followUpArticleTitle"|trans|sw_sanitize }}
  14.                             </div>
  15.                         {% endblock %}
  16.                         {% block follow_up_article_content %}
  17.                             <div class="follow-up-article-product">
  18.                                 <div class="row">
  19.                                     <div class="col-md-2">
  20.                                         {% block follow_up_article_media %}
  21.                                             {% if followUpArticle.cover.media.url %}
  22.                                                 <a href="{{ seoUrl('frontend.detail.page', {'productId': followUpArticle.id}) }}"
  23.                                                    title="{{ followUpArticle.translated.name }}">
  24.                                                     <img class="follow-up-article-img"
  25.                                                          src="{{ followUpArticle.cover.media.url }}"
  26.                                                          alt="{{ followUpArticle.translated.name }}">
  27.                                                 </a>
  28.                                             {% else %}
  29.                                                 {% sw_icon 'placeholder' style {
  30.                                                     'size': 'lg'
  31.                                                 } %}
  32.                                             {% endif %}
  33.                                         {% endblock %}
  34.                                     </div>
  35.                                     <div class="col-md-10">
  36.                                         {% block follow_up_article_name %}
  37.                                             <a href="{{ seoUrl('frontend.detail.page', {'productId': followUpArticle.id}) }}"
  38.                                                class="title">
  39.                                                 {{ followUpArticle.translated.name }}
  40.                                             </a>
  41.                                         {% endblock %}
  42.                                         {% block follow_up_article_product_number %}
  43.                                             {% if followUpArticle.productNumber %}
  44.                                                 <div class="product-detail-ordernumber-container">
  45.                                                     {% block follow_up_article_product_number_label %}
  46.                                                         <span class="product-detail-ordernumber-label">{{ "detail.productNumberLabel"|trans|sw_sanitize }}</span>
  47.                                                     {% endblock %}
  48.                                                     {% block follow_up_article_number %}
  49.                                                         <meta itemprop="productID"
  50.                                                               content="{{ followUpArticle.id }}"/>
  51.                                                         <span class="product-detail-ordernumber"
  52.                                                               itemprop="sku">{{ followUpArticle.productNumber }}</span>
  53.                                                     {% endblock %}
  54.                                                 </div>
  55.                                             {% endif %}
  56.                                         {% endblock %}
  57.                                         {% block follow_up_article_price %}
  58.                                             {% if b2bPlatformConfig.disableProductPricesVisibility and not context.customer %}
  59.                                                 {% block page_product_detail_login_to_buy_label %}
  60.                                                     <div class="product-login-to-buy-label">
  61.                                                         <i class="fa fa-info-circle"></i>{{ 'detail.loginToBuy'|trans|sw_sanitize }}
  62.                                                     </div>
  63.                                                 {% endblock %}
  64.                                             {% else %}
  65.                                                 {% if b2b_show_prices() %}
  66.                                                     {{ followUpArticle.calculatedPrice.unitPrice|currency }}
  67.                                                 {% elseif not isEmployee %}
  68.                                                     {{ followUpArticle.calculatedPrice.unitPrice|currency }}
  69.                                                 {% endif %}
  70.                                             {% endif %}
  71.                                         {% endblock %}
  72.                                     </div>
  73.                                 </div>
  74.                             </div>
  75.                         {% endblock %}
  76.                     </div>
  77.                 {% endblock %}
  78.             {% endif %}
  79.         {% endif %}
  80.     </div>
  81. {% endblock %}
  82. {% block page_product_detail_content %}
  83.     {% set order =  page.extensions.orderProductAlreadyBought %}
  84.     {% if order %}
  85.         <div class="product-already-bought">
  86.             <p class="product-already-bought-title">
  87.                 {% sw_icon 'info' style {
  88.                     'size': 'sm'
  89.                 } %}
  90.                 {{ "productDetail.productAlreadyBoughtText"|trans({'%orderAt%': order.createdAt|format_date('short', locale=locale)})|sw_sanitize }}
  91.             </p>
  92.             <div class="d-lg-flex">
  93.                 {% if order.product.options %}
  94.                     <p class="options">
  95.                         {% for option in order.product.options %}
  96.                             <span>{{ option.group }}: {{ option.option }}</span> |
  97.                         {% endfor %}
  98.                     </p>
  99.                 {% endif %}
  100.                 <a href="{{ path('frontend.b2b_platform.index') }}/order/?id={{ order.orderId }}"
  101.                    title="{{ "account.ordersLink"|trans|striptags }}"
  102.                    class="order-details">
  103.                     {{ 'productDetail.showOrderDetails'|trans|sw_sanitize }}
  104.                 </a>
  105.             </div>
  106.         </div>
  107.     {% endif %}
  108.     {{ parent() }}
  109. {% endblock %}
  110. {% block page_product_detail_tabs %}
  111.     {{ parent() }}
  112.     
  113.     {% if b2b_feature_enabled('B2bPdpVariantList') %}
  114.         {% sw_include '@B2bSellersCore/storefront/page/product-detail/product-variante-info.html.twig' %}
  115.     {% endif %}
  116. {% endblock %}