{% sw_extends '@Storefront/storefront/component/product/listing.html.twig' %}
{% block product_listing %}
{% if ([context] is sc_can_buy) %}
{# Insert hint to switch between catalog and shop #}
{% set country = sc_get_country_by_language(context)|lower %}
{% set shopUrl = ('steinco.global.shopUrl.' ~ country)|trans({}, "messages", "de-DE")|sw_sanitize %}
<div class="block-product-listing-switch">
<div class="sc-switch-channel">
{% set country = sc_get_country_by_language(context)|lower %}
{% set shopHint = ('steinco.shop.hint.' ~ country)|trans({}, "messages", "de-DE")|sw_sanitize %}
{{ shopHint|raw }}
</div>
</div>
{% endif %}
{{ parent() }}
{% endblock %}
{% block element_product_listing_pagination_nav_top %}
{{ parent() }}
</div>
<div class="col-md-auto" style="text-align: center; padding-top: 1rem;">
{{ "steinco.itemsFound"|trans({'%count%': searchResult.total})|sw_sanitize }}
{% endblock %}
{% block element_product_listing_sorting %}
{{ parent() }}
{% if not shopChannel %}
<script>
/* hide the two price sorting options in the sort order select */
let elem = document.querySelector('select option[value=price-asc]');
if ( elem)
elem.style.display = "none";
elem = document.querySelector('select option[value=price-desc]');
if ( elem)
elem.style.display = "none";
</script>
{% endif %}
{% endblock %}