custom/plugins/SteincoTheme/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 product_listing %}
  3.     {% if ([context] is sc_can_buy) %}
  4.         {# Insert hint to switch between catalog and shop #}
  5.         {% set country = sc_get_country_by_language(context)|lower %}
  6.         {% set shopUrl = ('steinco.global.shopUrl.' ~ country)|trans({}, "messages", "de-DE")|sw_sanitize %}
  7.         <div class="block-product-listing-switch">
  8.             <div class="sc-switch-channel">
  9.                 {% set country = sc_get_country_by_language(context)|lower %}
  10.                 {% set shopHint = ('steinco.shop.hint.' ~ country)|trans({}, "messages", "de-DE")|sw_sanitize %}
  11.                 {{ shopHint|raw }}
  12.             </div>
  13.         </div>
  14.     {% endif %}
  15.     {{ parent() }}
  16. {% endblock %}
  17. {% block element_product_listing_pagination_nav_top %}
  18.     {{  parent() }}
  19.     </div>
  20.     <div class="col-md-auto" style="text-align: center; padding-top: 1rem;">
  21.         {{ "steinco.itemsFound"|trans({'%count%': searchResult.total})|sw_sanitize }}
  22. {% endblock %}
  23. {% block element_product_listing_sorting %}
  24.     {{  parent() }}
  25.     {%  if not shopChannel %}
  26.         <script>
  27.             /* hide the two price sorting options in the sort order select */
  28.             let elem = document.querySelector('select option[value=price-asc]');
  29.             if ( elem)
  30.                 elem.style.display = "none";
  31.             elem = document.querySelector('select option[value=price-desc]');
  32.             if ( elem)
  33.                 elem.style.display = "none";
  34.         </script>
  35.     {% endif %}
  36. {% endblock %}