vendor/shopware/storefront/Resources/views/storefront/component/product/card/box.html.twig line 1

Open in your IDE?
  1. {% block component_product_box_include %}
  2.     {# Includes a custom product-box template defined by the layout variable.
  3.        The standard template is used if no custom layout is set. #}
  4.     {% if layout is empty %}
  5.         {% set layout = 'standard' %}
  6.     {% endif %}
  7.     {% set sizes = {
  8.         'xs': '500px',
  9.         'sm': '315px',
  10.         'md': '390px',
  11.         'lg': '350px',
  12.         'xl': '280px'
  13.     } %}
  14.     {% if layout == 'image' %}
  15.         {% set sizes = {
  16.             'xs': '500px',
  17.             'sm': '500px',
  18.             'md': '390px',
  19.             'lg': '350px',
  20.             'xl': '280px'
  21.         } %}
  22.     {% endif %}
  23.     {% if layout == 'standard' %}
  24.         {% sw_include "@Storefront/storefront/component/product/card/box-standard.html.twig" %}
  25.     {% elseif layout == 'image' %}
  26.         {% sw_include "@Storefront/storefront/component/product/card/box-image.html.twig" %}
  27.     {% elseif layout == 'minimal' %}
  28.         {% sw_include "@Storefront/storefront/component/product/card/box-minimal.html.twig" %}
  29.     {% elseif layout == 'wishlist' %}
  30.         {% sw_include "@Storefront/storefront/component/product/card/box-wishlist.html.twig" %}
  31.     {% else %}
  32.         {% set template = "@Storefront/storefront/component/product/card/box-" ~ layout ~ ".html.twig" %}
  33.         {% sw_include template ignore missing %}
  34.     {% endif %}
  35. {% endblock %}