custom/plugins/b2bsellerscore/src/Resources/views/storefront/component/product/listing.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/listing.html.twig' %}
  2.         {% block element_product_listing_pagination_nav_top %}
  3.             <div class="d-flex flex-row listing-pagination-container">
  4.                 {{ parent() }}
  5.                 {% set productsListSwitcher = cmsPage.extensions.category is defined and not cmsPage.extensions.category.customFields.b2b_show_products_list_switcher %}
  6.                 {% if b2bPlatformConfig.enableListSwitch and context.customer and productsListSwitcher %}
  7.                     {% if app.request.cookies.get('useB2bList') != 'yes' %}
  8.                         {% block element_product_listing_pagination_nav_top_use_b2blist_link %}
  9.                             <a href="{{ seoUrl('frontend.b2b_b2blist.index', {'useB2bList': 'true'}) }}"
  10.                                class="btn btn-primary btn-products-list-switcher"
  11.                                title=" {{ "b2bPlatform.listing.switchToList"|trans }}">
  12.                                 {% sw_icon 'editor-list' %}
  13.                                 {{ "b2bPlatform.listing.switchToList"|trans|sw_sanitize }}
  14.                             </a>
  15.                         {% endblock %}
  16.                     {% else %}
  17.                         {% block element_product_listing_pagination_nav_top_not_use_b2blist_link %}
  18.                             <a href="{{ seoUrl('frontend.b2b_b2blist.index', {'useB2bList': 'false'}) }}"
  19.                                class="btn btn-primary btn-products-list-switcher"
  20.                                title=" {{ "b2bPlatform.listing.switchToTiles"|trans }}">
  21.                                 {% sw_icon 'view-grid' %}
  22.                                 {{ "b2bPlatform.listing.switchToTiles"|trans|sw_sanitize }}
  23.                             </a>
  24.                         {% endblock %}
  25.                     {% endif %}
  26.                 {% endif %}
  27.             </div>
  28.         {% endblock %}
  29.         {% block element_product_listing_row %}
  30.             {% if searchResult.total > 0 %}
  31.                 {% if app.request.cookies.get('useB2bList') != 'yes' or not context.customer %}
  32.                     <div class="row cms-listing-row js-listing-wrapper">
  33.                         {% block element_product_listing_col %}
  34.                             {% for product in searchResult %}
  35.                                 <div class="cms-listing-col {{ listingColumns }}">
  36.                                     {% block element_product_listing_box %}
  37.                                         {% sw_include '@Storefront/storefront/component/product/card/box.html.twig' with {
  38.                                             'layout': boxLayout,
  39.                                             'displayMode': displayMode
  40.                                         } %}
  41.                                     {% endblock %}
  42.                                 </div>
  43.                             {% endfor %}
  44.                         {% endblock %}
  45.                     </div>
  46.                 {% else %}
  47.                     {% block element_product_listing_row_table %}
  48.                         {% if cmsPage is defined and cmsPage.extensions.listingTablePropertyGroups is defined %}
  49.                             {% set propertyGroups = cmsPage.extensions.listingTablePropertyGroups %}
  50.                         {% endif %}
  51.                         <div class="table-responsive">
  52.                             <table class="table table-hover product-list-table" data-product-list-table="true">
  53.                                 {% block element_product_listing_row_table_head %}
  54.                                     <thead>
  55.                                     <tr class="product-list-table-head">
  56.                                         <th scope="col" class="col-2">
  57.                                             {{ "b2bPlatform.listing.productsTable.productNumber"|trans|sw_sanitize }}
  58.                                         </th>
  59.                                         <th scope="col" class="col-2">
  60.                                             {{ "b2bPlatform.listing.productsTable.productName"|trans|sw_sanitize }}
  61.                                         </th>
  62.                                         <th scope="col">
  63.                                             {{ "b2bPlatform.listing.productsTable.productPrice"|trans|sw_sanitize }}
  64.                                         </th>
  65.                                         <th scope="col">
  66.                                             {{ "b2bPlatform.listing.productsTable.productLieferZeit"|trans|sw_sanitize }}
  67.                                         </th>
  68.                                         <th scope="col" class="col-1">
  69.                                             {{ "b2bPlatform.listing.productsTable.productAmount"|trans|sw_sanitize }}
  70.                                         </th>
  71.                                         {% if propertyGroups %}
  72.                                             {% block element_product_listing_property_groups %}
  73.                                                 {% for group in propertyGroups %}
  74.                                                     {% block element_product_listing_property_group %}
  75.                                                         <th>
  76.                                                             {{ group.translated.name }}
  77.                                                         </th>
  78.                                                     {% endblock %}
  79.                                                 {% endfor %}
  80.                                             {% endblock %}
  81.                                         {% endif %}
  82.                                         <th scope="col" class="text-right col-2">
  83.                                             {{ "b2bPlatform.listing.productsTable.productOption"|trans|sw_sanitize }}
  84.                                         </th>
  85.                                     </tr>
  86.                                     </thead>
  87.                                 {% endblock %}
  88.                                 {% block element_product_listing_row_table_body %}
  89.                                     <tbody>
  90.                                     {% for product in searchResult %}
  91.                                         {% block element_product_listing_row_table_product %}
  92.                                             <tr class="product-list-table-product">
  93.                                                 {% sw_include '@B2bSellersCore/storefront/component/product/card/box-b2blist.html.twig' %}
  94.                                             </tr>
  95.                                         {% endblock %}
  96.                                     {% endfor %}
  97.                                     </tbody>
  98.                                 {% endblock %}
  99.                             </table>
  100.                         </div>
  101.                     {% endblock %}
  102.                 {% endif %}
  103.             {% else %}
  104.                 <div class="row cms-listing-row js-listing-wrapper">
  105.                     {% block element_product_listing_col_empty %}
  106.                         <div class="cms-listing-col col-12">
  107.                             {% block element_product_listing_col_empty_alert %}
  108.                                 {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  109.                                     type: 'info',
  110.                                     content: 'listing.emptyResultMessage'|trans|sw_sanitize
  111.                                 } %}
  112.                             {% endblock %}
  113.                         </div>
  114.                     {% endblock %}
  115.                 </div>
  116.             {% endif %}
  117.         {% endblock %}