<!--Category section filters-->
<div class="row d-none d-xl-block d-lg-block d-md-block">
<div class="d-none d-xl-block d-lg-block d-md-block col-xl-2 col-lg-2 col-md-2 col-2"></div>
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12" id="checked-filters">
<!--<div class="category-products-filter-by">filter<button class="category-products-filter-by-btn-close">x</button></div>-->
{% if sorting is defined %}
{% set sort_popularity_order = "desc" %}
{% set sort_date_order = "desc" %}
{% set sort_price_order = "desc" %}
{% if sorting == "popularity" %}
{% if order == "asc" %}
{% set sort_popularity_order = "desc" %}
{% else %}
{% set sort_popularity_order = "asc" %}
{% endif %}
{% elseif sorting == "date" %}
{% if order == "asc" %}
{% set sort_date_order = "desc" %}
{% else %}
{% set sort_date_order = "asc" %}
{% endif %}
{% elseif sorting == "price" %}
{% if order == "asc" %}
{% set sort_price_order = "desc" %}
{% else %}
{% set sort_price_order = "asc" %}
{% endif %}
{% endif %}
{% if app.request.attributes.get('_route') == 'companyStore' %}
<a href="{{link}}" style="{% if sorting == null %}text-decoration: underline !important;{% endif %}">Défaut</a> |
{% endif %}
<a href="?sorting=popularity&order={{sort_popularity_order}}" style="{% if sorting == "popularity" %}text-decoration: underline !important;{% endif %}">Popularité {% if sort_popularity_order == "asc" %}⇡{% else %}⇣{% endif %}</a> |
<a href="?sorting=price&order={{sort_price_order}}" style="{% if sorting == "price" %}text-decoration: underline !important;{% endif %}">Prix {% if sort_price_order == "asc" %}⇡{% else %}⇣{% endif %}</a> |
<a href="?sorting=date&order={{sort_date_order}}" style="{% if sorting == "date" %}text-decoration: underline !important;{% endif %}">Récent {% if sort_date_order == "asc" %}⇡{% else %}⇣{% endif %}</a>
{% endif %}
<div class="category-products-result">
RÉSULTATS: {{amountProductsPerCategories}} PRODUITS
</div>
</div>
</div>
<!--Category section filters-->
<!--Category section products-->
<div class="row products-wrap">
<div class="products-wrap__category d-none d-xl-block d-lg-block d-md-block col-xl-2 col-lg-2 col-md-2 pull-left">
<div class="category-products-filters not-mobile">
<ul>
<li class="category-product-filter__name" style="font-size: 15px;">
<a href="{{link}}" class="filterCompany" value="0">Tout <span class="product-count">{{amountProductsTotal.total}}</span></a>
</li>
{% for key, category in productCategories %}
<li class="category-product-filter__name" style="font-size: 15px;">
<a href="#" class="filterCompany" value="{{category.id}}">{{category.name}} <span class="product-count">{{category.amount}}</span></a>
</li>
{% endfor %}
</ul>
</div>
</div>
<div class="products-wrap__products col-xl-10 col-lg-10 col-md-10 col-sm-12 col-12">
{{ include ('frontend/productMasonry.html.twig', {'masonryProducts': availableProducts} ) }}
</div>
</div>