{% sw_extends '@Storefront/storefront/component/product/listing.html.twig' %}
{% block element_product_listing_pagination_nav_top %}
<div class="d-flex flex-row listing-pagination-container">
{{ parent() }}
{% set productsListSwitcher = cmsPage.extensions.category is defined and not cmsPage.extensions.category.customFields.b2b_show_products_list_switcher %}
{% if b2bPlatformConfig.enableListSwitch and context.customer and productsListSwitcher %}
{% if app.request.cookies.get('useB2bList') != 'yes' %}
{% block element_product_listing_pagination_nav_top_use_b2blist_link %}
<a href="{{ seoUrl('frontend.b2b_b2blist.index', {'useB2bList': 'true'}) }}"
class="btn btn-primary btn-products-list-switcher"
title=" {{ "b2bPlatform.listing.switchToList"|trans }}">
{% sw_icon 'editor-list' %}
{{ "b2bPlatform.listing.switchToList"|trans|sw_sanitize }}
</a>
{% endblock %}
{% else %}
{% block element_product_listing_pagination_nav_top_not_use_b2blist_link %}
<a href="{{ seoUrl('frontend.b2b_b2blist.index', {'useB2bList': 'false'}) }}"
class="btn btn-primary btn-products-list-switcher"
title=" {{ "b2bPlatform.listing.switchToTiles"|trans }}">
{% sw_icon 'view-grid' %}
{{ "b2bPlatform.listing.switchToTiles"|trans|sw_sanitize }}
</a>
{% endblock %}
{% endif %}
{% endif %}
</div>
{% endblock %}
{% block element_product_listing_row %}
{% if searchResult.total > 0 %}
{% if app.request.cookies.get('useB2bList') != 'yes' or not context.customer %}
<div class="row cms-listing-row js-listing-wrapper">
{% block element_product_listing_col %}
{% for product in searchResult %}
<div class="cms-listing-col {{ listingColumns }}">
{% block element_product_listing_box %}
{% sw_include '@Storefront/storefront/component/product/card/box.html.twig' with {
'layout': boxLayout,
'displayMode': displayMode
} %}
{% endblock %}
</div>
{% endfor %}
{% endblock %}
</div>
{% else %}
{% block element_product_listing_row_table %}
{% if cmsPage is defined and cmsPage.extensions.listingTablePropertyGroups is defined %}
{% set propertyGroups = cmsPage.extensions.listingTablePropertyGroups %}
{% endif %}
<div class="table-responsive">
<table class="table table-hover product-list-table" data-product-list-table="true">
{% block element_product_listing_row_table_head %}
<thead>
<tr class="product-list-table-head">
<th scope="col" class="col-2">
{{ "b2bPlatform.listing.productsTable.productNumber"|trans|sw_sanitize }}
</th>
<th scope="col" class="col-2">
{{ "b2bPlatform.listing.productsTable.productName"|trans|sw_sanitize }}
</th>
<th scope="col">
{{ "b2bPlatform.listing.productsTable.productPrice"|trans|sw_sanitize }}
</th>
<th scope="col">
{{ "b2bPlatform.listing.productsTable.productLieferZeit"|trans|sw_sanitize }}
</th>
<th scope="col" class="col-1">
{{ "b2bPlatform.listing.productsTable.productAmount"|trans|sw_sanitize }}
</th>
{% if propertyGroups %}
{% block element_product_listing_property_groups %}
{% for group in propertyGroups %}
{% block element_product_listing_property_group %}
<th>
{{ group.translated.name }}
</th>
{% endblock %}
{% endfor %}
{% endblock %}
{% endif %}
<th scope="col" class="text-right col-2">
{{ "b2bPlatform.listing.productsTable.productOption"|trans|sw_sanitize }}
</th>
</tr>
</thead>
{% endblock %}
{% block element_product_listing_row_table_body %}
<tbody>
{% for product in searchResult %}
{% block element_product_listing_row_table_product %}
<tr class="product-list-table-product">
{% sw_include '@B2bSellersCore/storefront/component/product/card/box-b2blist.html.twig' %}
</tr>
{% endblock %}
{% endfor %}
</tbody>
{% endblock %}
</table>
</div>
{% endblock %}
{% endif %}
{% else %}
<div class="row cms-listing-row js-listing-wrapper">
{% block element_product_listing_col_empty %}
<div class="cms-listing-col col-12">
{% block element_product_listing_col_empty_alert %}
{% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
type: 'info',
content: 'listing.emptyResultMessage'|trans|sw_sanitize
} %}
{% endblock %}
</div>
{% endblock %}
</div>
{% endif %}
{% endblock %}