custom/plugins/b2bsellerscore/src/Resources/views/storefront/page/account/sidebar.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/account/sidebar.html.twig' %}
  2. {% block page_account_sidebar_menu %}
  3.     {% if context.customer %}
  4.         {{ parent() }}
  5.     {% endif %}
  6. {% endblock %}
  7. {% block page_account_sidebar_menu_inner %}
  8.     {% if not context.customer.customFields.b2b_sales_representative %}
  9.         {{ parent() }}
  10.     {% else %}
  11.         <a href="{{ path('frontend.b2b_platform.index') }}"
  12.            title="{{ "b2bPlatform.menuItems.dashboard"|trans|striptags }}"
  13.            class="list-group-item list-group-item-action account-aside-item">
  14.             {{ "b2bPlatform.menuItems.dashboard"|trans|sw_sanitize }}
  15.         </a>
  16.     {% endif %}
  17.     {% if b2b_feature_enabled('B2bProductLists') %}
  18.         {% if not isSalesRepresentative %}
  19.             {% block page_account_sidebar_link_product_list %}
  20.                 {% if b2bProductListConfig.showProductListsFunction %}
  21.                     {% if context.extensions.b2bPlatformContext is defined %}
  22.                         <a href="{{ path('frontend.b2b_platform.path', {path: 'product-list'}) }}"
  23.                            title="{{ "b2bProductList.account.productListLink"|trans|striptags }}"
  24.                            class="list-group-item list-group-item-action account-aside-item">
  25.                             {{ "b2bProductList.account.productListLink"|trans|sw_sanitize }}
  26.                         </a>
  27.                     {% else %}
  28.                         <a href="{{ path('frontend.product-list.overview') }}"
  29.                            title="{{ "b2bProductList.account.productListLink"|trans|striptags }}"
  30.                            class="list-group-item list-group-item-action account-aside-item">
  31.                             {{ "b2bProductList.account.productListLink"|trans|sw_sanitize }}
  32.                         </a>
  33.                     {% endif %}
  34.                 {% endif %}
  35.             {% endblock %}
  36.         {% endif %}
  37.     {% endif %}
  38.     {% block page_account_sidebar_link_payment %}
  39.         <a href="{{ path('frontend.b2b_platform.path', {path: 'payment-methods'}) }}"
  40.            title="{{ "account.paymentLink"|trans|striptags }}"
  41.            class="list-group-item list-group-item-action account-aside-item{% if activeRoute is same as('frontend.account.payment.page') %} is-active{% endif %}">
  42.             {{ "account.paymentLink"|trans|sw_sanitize }}
  43.         </a>
  44.     {% endblock %}
  45. {% endblock %}
  46. {% block page_account_sidebar_link_home %}
  47.     {% if context.customer and context.customer.customFields.b2b_platform_access %}
  48.         <a href="{{ path('frontend.b2b_platform.index') }}"
  49.            title="{{ "b2bPlatform.menuItems.dashboard"|trans|striptags }}"
  50.            class="list-group-item list-group-item-action account-aside-item">
  51.             {{ "b2bPlatform.menuItems.dashboard"|trans|sw_sanitize }}
  52.         </a>
  53.     {% else %}
  54.         {{ parent() }}
  55.     {% endif %}
  56. {% endblock %}
  57. {% block page_account_sidebar_link_profile %}
  58.     {% if context.customer and context.customer.customFields.b2b_platform_access %}
  59.         {% set employee = context.extensions.b2bPlatformContext.employee %}
  60.         <a href="{{ path('frontend.b2b_platform.path', {path: 'account'}) }}"
  61.            title="{{ "account.profileLink"|trans|striptags }}"
  62.            class="list-group-item list-group-item-action account-aside-item">
  63.             {{ "account.profileLink"|trans|sw_sanitize }}
  64.         </a>
  65.     {% else %}
  66.         {{ parent() }}
  67.     {% endif %}
  68. {% endblock %}
  69. {% block page_account_sidebar_link_orders %}
  70.     {% if context.customer and context.customer.customFields.b2b_platform_access %}
  71.         {% block page_account_sidebar_link_b2b_order %}
  72.             <a href="{{ path('frontend.b2b_platform.index') }}/order"
  73.                title="{{ "account.ordersLink"|trans|striptags }}"
  74.                class="list-group-item list-group-item-action account-aside-item">
  75.                 {{ "account.ordersLink"|trans|sw_sanitize }}
  76.             </a>
  77.         {% endblock %}
  78.         {% block page_account_sidebar_link_b2b_fastorder %}
  79.             {% if context.customer and context.customer.customFields.b2b_platform_access %}
  80.                 <a href="{{ path('frontend.b2b_platform.index') }}/fast-order"
  81.                    title="{{ "b2bPlatform.menuItems.fastOrder"|trans|striptags }}"
  82.                    class="list-group-item list-group-item-action account-aside-item">
  83.                     {{ "b2bPlatform.menuItems.fastOrder"|trans|sw_sanitize }}
  84.                 </a>
  85.             {% endif %}
  86.         {% endblock %}
  87.     {% else %}
  88.         {{ parent() }}
  89.     {% endif %}
  90. {% endblock %}
  91. {% block page_account_sidebar_link_address %}
  92.     {% if context.customer and context.customer.customFields.b2b_platform_access %}
  93.         <a href="{{ path('frontend.b2b_platform.index') }}/address"
  94.            title="{{ "account.addressLink"|trans|striptags }}"
  95.            class="list-group-item list-group-item-action account-aside-item">
  96.             {{ "account.addressLink"|trans|sw_sanitize }}
  97.         </a>
  98.     {% else %}
  99.         {{ parent() }}
  100.     {% endif %}
  101. {% endblock %}
  102. {% block page_account_sidebar_logout %}
  103.     {% if context.extensions.b2bPlatformContext and b2b_feature_enabled('B2bBonusProgram') %}
  104.         {% set customer = context.customer %}
  105.         {% if employee_permission(['viewBonus']) and customer.customFields.b2b_bonus_enabled %}
  106.             <div class="card-footer b2b-bonus-container">
  107.                 {% block page_account_sidebar_bonus %}
  108.                     <div
  109.                             class="btn btn-link account-aside-btn">
  110.                         {% sw_icon 'medal' %}
  111.                         <span class="b2b-bonus-label">{{ "b2bBonusProgram.header.account.myBonus" |trans|sw_sanitize }}: </span>
  112.                         <span class="b2b-bonus-value">{{ customer.customFields.b2b_current_bonus |currency }}</span>
  113.                     </div>
  114.                 {% endblock %}
  115.             </div>
  116.         {% endif %}
  117.     {% endif %}
  118.     {{ parent() }}
  119. {% endblock %}