themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Product/Show/_associations.html.twig line 23

Open in your IDE?
  1. {% import '@SyliusShop/Common/Macro/sectionHeaders.html.twig' as headers %}
  2. {% set displayNews = 0 %}
  3. {% for association in product.associations  %}
  4.     {% if association.getType().getCode() == "related_products"%}
  5.     <div class="max-container-6 mt-lg-5 mt-4 article-bottom top-index-slider-desk">
  6.         <div class="border rounded-10 bg-white p-3 p-xl-4">
  7.             {{ render(url('sylius_shop_partial_product_association_show', {'productId': product.id, 'id': association.id, 'template': '@SyliusShop/Product/Show/_association.html.twig'})) }}
  8.         </div>
  9.     </div>
  10.     {% else %}
  11.         {% set displayNews = 1 %}
  12.     {% endif %}
  13. {% endfor %}
  14. {% if (product.associations|length == 0) or (displayNews == 1) %}
  15.     {% set countNbProduct_a_completer = app_get_parameter('nb_product_to_complete') %}
  16.     {% if not countNbProduct_a_completer %}
  17.         {% set countNbProduct_a_completer = 4 %}
  18.     {% endif %}
  19.     <div class="max-container-6 mt-lg-5 mt-4 article-bottom top-index-slider-desk">
  20.         <div class="border rounded-10 bg-white p-3 p-xl-4">
  21.         {{ render(url('sylius_shop_partial_product_index_latest', {'count': countNbProduct_a_completer, 'template': '@SyliusShop/Product/_horizontalListWithHeader.html.twig'})) }}
  22.         </div>
  23.     </div>
  24. {% endif %}