{% extends '@SyliusShop/layout.html.twig' %}{% import '@SyliusUi/Macro/pagination.html.twig' as pagination %}{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}{% block title %} {% if taxon is defined and taxon.translation.metaTitle is not null and taxon.translation.metaTitle != "" %} {{ taxon.translation.metaTitle }} {% else %} {% if app_get_page_meta_by_code("taxon",{ 'taxon': taxon }) is not empty %} {% set meta = app_get_page_meta_by_code("taxon", { 'taxon': taxon }) %} {% if meta.title is not null %} {{ meta.title }} {% else %} {{ parent() }} {% endif %} {% else %} {{ parent() }} {% endif %} {% endif %}{% endblock %}{% block metatags %} {% if taxon is defined and taxon.translation.metaDescription is not null and taxon.translation.metaTitle != "" %} <meta name="description" content="{{ taxon.translation.metaDescription }}"> {% else %} {% if app_get_page_meta_by_code("taxon", { 'taxon': taxon}) is not empty %} {% set meta = app_get_page_meta_by_code("taxon", { 'taxon': taxon }) %} {% if meta.metaDescription is not null %} <meta name="description" content="{{ meta.metaDescription }}"> {% else %} {{ parent() }} {% endif %} {% if meta.metaRobotIndex == true %} {% set metaRobotIndex = 'index, follow' %} {% elseif meta.metaRobotIndex == false %} {% set metaRobotIndex = 'noindex, nofollow' %} {% endif %} <meta name="robots" content="{{ metaRobotIndex }}"/> {% else %} {{ parent() }} {% endif %} {% endif %}{% endblock %}{% block content %} {% set missingAmountFranco = app_get_missing_franco_port() %} <div class="page-categorie-content"> <div class="categorie-top"> <div class="max-container-4 px-0"> {% include '@SyliusShop/Product/Index/_sidebar.html.twig' %} </div> </div> <div class="max-container-4 px-xl-0"> <div class="categ-bottom"> {% if result.count == 0 %} <div class="my-3 px-2 text-center pt-4 no-result"> <div class="d-inline-block"> <div class="alert alert-danger"> {{ 'app.common.aucun_produit_disponible'|trans }} </div> </div> </div> {% else %} <div class="px-0"> <div class="filtre-cat d-none"> {% include '@MonsieurBizSyliusSearchPlugin/Search/_sidebar.html.twig' %} </div> <div class="res-filtre fontsize-mobile-text pb-0 pt-md-0 pt-3 d-none "> <div class="d-flex align-items-center justify-content-md-start justify-content-between"> <div class="order-md-12 d-none d-md-block"> <h2 class="d-inline-block text-sofiaMedium" style="font-size: 1.2rem; margin-bottom: 0;">{{ "app.ui.your_selection"|trans }} :</h2> {% for filter in result.filters %} {% for value in filter.values %} {% if value.isApplied and filter.type != "range" %} <div class="d-inline-block delete-filter cursor-pointer" data-filter="{{ 'filter-' ~ filter.code ~ '-value-' ~ value.slug }}" ><span>{{ value.label}} <i class="icon-cancel color-orange"></i></span></div> {% endif %} {% endfor %} {% endfor %} </div> <div class="order-md-1 pt-sm-0 pt-2"><strong class="nbre-article fontsize-mobilesm-text ">{{ result.count}} {{ "app.ui.products"|trans|lower }} </strong></div> <div class="d-md-none_ d-block_ d-none mobile-label-filtre">{{ "app.ui.sort_per"|trans|capitalize }} <i class="icon-down-open-big"></i></div> </div> </div> </div> <div class="liste-articles pt-lg-4 pt-md-3 pt-2 pb-md-4 pb-2 mt-xl-2 px-md-0 px-perso-top"> <div class="row mx-0" id="products"> <div class="col-xl-perso col-lg-3 col-md-4 col-6 mb-3 px-0"> <div class="h-100 pb-sm-3 pt-perso-10"> <a href="#" class="link-free-delivery d-flex align-items-center justify-content-center h-100 flex-column transition-bgcolor"> {{ "app.ui.free_delivery"|trans|raw }} <em>{{ money.convertAndFormat(missingAmountFranco) }}</em>{# <em>{{ "app.ui.from"|trans }} 60€</em>#}{# {{'app.cart.missing_x_for_franco'|trans}} <span class="color-pink-s">{{ money.convertAndFormat(missingAmountFranco) }}</span> {{'app.cart.before_free_shipping'|trans}}#} </a> </div> </div> {% set productsUsefullNbr = taxon.productsUsefull.count %} {% set productsNbr = result.count %} {% if productsUsefullNbr == 1 %} {% set productUsefullPos = (productsNbr / 2)|round %} {% elseif productsUsefullNbr > 0 %} {% set productUsefullPos = (productsNbr / productsUsefullNbr)|round %} {% endif %} {% set i = 0 %} {% set itemNum = 0 %} {% for item in result %} {% set itemNum = itemNum + 1 %} <div class="col-xl-perso col-lg-3 col-md-4 col-6 mb-3 px-0"> {% set product = product_repository.find(item.id) %} {% include '@SyliusShop/Product/_box.html.twig' with {'product': product} only %} </div> {% if productsUsefullNbr > 0 and i < productsUsefullNbr %} {% if itemNum == productUsefullPos %} {% for itemUsefull in taxon.productsUsefull|slice(i, i + 1) %} {% set productUsefull = product_repository.find(itemUsefull.id) %} {% if productUsefull.enabled %} <div class="col-xl-perso col-lg-3 col-md-4 col-6 mb-3 px-0 article-usefull"> {% include '@SyliusShop/Product/_box.html.twig' with {'product': productUsefull} only %} </div> {% endif %} {% set i = i + 1 %} {% endfor %} {% set itemNum = 0 %} {% endif %} {% endif %} {% endfor %} {% if productsUsefullNbr > 0 and i < productsUsefullNbr %} {% for itemUsefull in taxon.productsUsefull|slice(i, i + 1) %} {% set productUsefull = product_repository.find(itemUsefull.id) %} {% if productUsefull.enabled %} <div class="col-xl-perso col-lg-3 col-md-4 col-6 mb-3 px-0 article-usefull"> {% include '@SyliusShop/Product/_box.html.twig' with {'product': productUsefull} only %} </div> {% endif %} {% set i = i + 1 %} {% endfor %} {% endif %} </div> {{ pagination.simple(result.paginator) }} </div> {% if taxon.translation.textSEO is not empty %}{# <div class="texte-gris fontsize-mobile-text text-regular-onlg pt-2 font-texte-normale pt-md-2 pt-0 mp-0 pb-xl-4 pb-md-3">#}{# {{ taxon.translation.textSEO|raw }}#} <div class="texte-gris fontsize-mobile-text text-regular-onlg pt-2 font-texte-normale pt-md-2 pt-0 mp-0 pb-xl-4 pb-md-3 "> <div class="texte-seo"> {{ taxon.translation.textSEO|raw }} </div> </div> {% endif %} {% if taxon.productsAssociated|length > 0 %} <div class="pt-lg-4 pt-2"> <h2 class="titre-medium text-uppercase max-after"><span>{{'app.ui.products_associated'|trans}}</span></h2> <div class="contenu-art-top"> <div class="selection-prev prev-top"></div> <div class="selection-next next-top"></div> <div id="sylius-carouselselection" class="top-nouvselection swiper-container product-swiper-container"> <div class="swiper-wrapper"> {% for product in taxon.productsAssociated %} <div class="produit-selection-item swiper-slide"> <div class=""> {% include '@SyliusShop/Product/_box.html.twig' %} </div> </div> {% endfor %} </div> <div class="swiper-pagination"></div> </div> </div> </div> {% endif %} {% endif %} </div> </div> </div>{% endblock %}