custom/plugins/b2bsellerscore/src/Resources/views/storefront/layout/header/header.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/header/header.html.twig' %}
  2. {% block layout_top_bar %}
  3.     {% block layout_top_bar_b2b_top_bar %}
  4.         {% sw_include '@B2bSellersCore/storefront/layout/header/actions/topbar-widget.html.twig' %}
  5.     {% endblock %}
  6.     {{ parent() }}
  7. {% endblock %}
  8. {% block layout_header_search_toggle %}
  9.     {{ parent() }}
  10.     {% if not isSalesRepresentative %}
  11.         {% block layout_header_actions_consumer_view %}
  12.             {% if b2bPlatformConfig.enableConsumerView and context.customer %}
  13.                 {% sw_include '@B2bSellersCore/storefront/layout/header/actions/consumer-view-widget.html.twig' %}
  14.             {% endif %}
  15.         {% endblock %}
  16.     {% endif %}
  17.     {% if not isSalesRepresentative %}
  18.         {% block layout_header_actions_fastorder %}
  19.             {% sw_include '@B2bSellersCore/storefront/layout/header/actions/fast-order-widget.html.twig' %}
  20.         {% endblock %}
  21.     {% endif %}
  22. {% endblock %}
  23. {% block layout_header_actions_cart %}
  24.     {% set isCartEnabled = (not isSalesRepresentative or loggedInAsCustomer) and (not b2bPlatformConfig.closedShop or context.customer) %}
  25.     {% set hasCartPermission = not context.extensions.b2bPlatformContext or employee_permission(['order']) %}
  26.     {% if isCartEnabled and hasCartPermission %}
  27.         {% if b2bPlatformConfig.disableProductPricesVisibility and not context.customer %}
  28.             {% block layout_header_actions_cart_redirect %}
  29.                 <div class="col-auto">
  30.                     <div class="header-cart">
  31.                         {% block layout_header_actions_cart_redirect_link %}
  32.                             <a class="btn header-cart-btn header-actions-btn"
  33.                                href="{{ path('frontend.account.login.page') }}"
  34.                                data-cart-widget="true"
  35.                                title="{{ 'detail.loginToBuy'|trans|sw_sanitize }}"
  36.                                aria-label="{{ 'detail.loginToBuy'|trans|sw_sanitize }}">
  37.                                 {% sw_include '@Storefront/storefront/layout/header/actions/cart-widget.html.twig' %}
  38.                             </a>
  39.                         {% endblock %}
  40.                     </div>
  41.                 </div>
  42.             {% endblock %}
  43.         {% else %}
  44.             {{ parent() }}
  45.         {% endif %}
  46.     {% endif %}
  47. {% endblock %}
  48. {% block layout_header_search %}
  49.     {% set hasListingPermission = not context.extensions.b2bPlatformContext or employee_permission(['viewListing']) %}
  50.     {% if b2bPlatformConfig.closedShop and not context.customer or not hasListingPermission %}
  51.         {% block layout_header_search_disabled %}
  52.             <div class="col-12 order-2 col-sm order-sm-1 header-search-col"></div>
  53.         {% endblock %}
  54.     {% else %}
  55.         {{ parent() }}
  56.     {% endif %}
  57. {% endblock %}
  58. {% block layout_header_actions_account %}
  59.     {% if b2b_feature_enabled('B2bProductLists') %}
  60.         {% block layout_header_actions_product_lists %}
  61.             {% if b2bProductListConfig.showProductListsFunction %}
  62.                 {% sw_include '@B2bSellersCore/storefront/layout/header/actions/product-list-widget.html.twig' %}
  63.             {% endif %}
  64.         {% endblock %}
  65.     {% endif %}
  66.     {{ parent() }}
  67. {% endblock %}