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

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() == "similary_product"%}
  5.         <div class="bloc-top-content text-center">
  6.         {{ render(url('sylius_shop_partial_product_association_show', {'productId': product.id, 'id': association.id, 'template': '@SyliusShop/Product/Show/_association.html.twig'})) }}
  7.         </div>
  8.     {% else %}
  9.         {% set displayNews = 1 %}
  10.     {% endif %}
  11. {% endfor %}
  12. {% if (product.associations|length == 0) or (displayNews == 1) %}
  13.     <div class="bloc-top-content text-center">
  14.         {% set countNbProduct_a_completer = app_get_parameter('nb_product_to_complete') %}
  15.         {% if not countNbProduct_a_completer %}
  16.             {% set countNbProduct_a_completer = 4 %}
  17.         {% endif %}
  18.     {{ render(url('sylius_shop_partial_product_index_latest', {'count': countNbProduct_a_completer, 'template': '@SyliusShop/Product/_horizontalListWithHeader.html.twig'})) }}
  19.     </div>
  20. {% endif %}