custom/plugins/GrimmTheme/src/Resources/views/storefront/component/product/card/box.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/card/box.html.twig' %}
  2. {# overwrites S360ListingViewSwitch Plugin logic #}
  3. {% block component_product_box_include %}
  4.     {% set listingViewAllowed = true %}
  5.     {# ensure that list view wont get rendered for some box types and pages #}
  6.     {% if layout == 'minimal' %}
  7.         {% set layout = 'minimal-adjusted' %}
  8.         {% set listingViewAllowed = false %}
  9.     {% endif %}
  10.     
  11.     {# if search page (all condition need to be checked since controller changing) #}
  12.     {% if activeRoute in ["widgets.search.pagelet.v2", "frontend.search.page", "frontend.search.s360searchreload"] %}
  13.         {% set listingViewAllowed = false %}
  14.     {% endif %}
  15.     
  16.     {% if listingViewAllowed and app.request.cookies.get('s360ListingViewMode') is same as('list') %}
  17.         {% set listingColumns = config('S360ListingViewSwitch.config.listingClases') %}
  18.         <div class="s360-listing-view cms-listing-col {{ config('S360ListingViewSwitch.config.listingClases') }}">
  19.             {% sw_include '@Storefront/solution360/listingviewswitch/product-list.html.twig' %}
  20.         </div>
  21.     {% else %}
  22.         <div class="cms-listing-col {{ listingColumns }}">
  23.             {% if layout is empty %}
  24.                 {% set layout = 'standard' %}
  25.             {% endif %}
  26.             {% sw_include "@Storefront/storefront/component/product/card/box-" ~ layout ~ ".html.twig" ignore missing %}
  27.         </div>
  28.     {% endif %}
  29. {% endblock %}