{% extends 'product.html.twig' %}
{% block content %}
<script src="/website/static/js/productfilters.js" defer></script>
<!-- Added Comment- -->
<div class="breadcrumb-block">
<div class="container">
<!-- breadcrumb of the page -->
<ul class="breadcrumb">
<li><a href="/{{ locale }}" class="home">{{ "espirits.header.home"|trans }}</a></li>
<li><a href="{{ editmode or preview ? '' : path('product-landing',{ prefix: locale }, false) }}">{{ "espirits.header.our-products"| trans }}</a></li>
{% set parenturl = '' %}
{% if category is defined and category is not empty %}
{% set parentcategory = category.getParent() %}
{% set heading = category.getName() %}
{% if parentcategory and parentcategory.getType() == "object" and parentcategory.getClassname() == "CategoryAlcoholType" %}
{% set parenturl = parentcategory.getDetailUrl({"rootCategory" : parentcategory, "document" : document}) %}
<li><a href="{{ parenturl }}">{{ parentcategory.getName() }}</a></li>
{% endif %}
{% elseif BrandName is defined and BrandName is not empty and products|length != 0 %}
{% set heading = BrandName %}
<li><a href="{{ parenturl }}">{{ BrandName }}</a></li>
{% else %}
{% set heading = "espirits.header.our-products"|trans %}
{% endif %}
<li class="active">{{ category is defined and category is not empty ? category.getName() : "" }}</li>
</ul>
</div>
</div>
<div class="container">
{% if products|length == 0 %}
<div class="heading-holder">
<h1>{{ "espirits.search.results"|trans }}</h1>
</div>
<h3>{{ "shop.empty-result"|trans }}</h3>
{% else %}
<div class="heading-holder">
<!-- main heading of the page -->
<h1>{{ heading }}</h1>
</div>
<div class="row">
<div class="col-sm-4 col-md-3">
<div class="filter-block">
<a href="#" class="filter-opener">filter products</a>
<div class="filter-slide">
<!-- filter form of the page -->
<form class="filter-form" id="js_filterfield" action="" method="get">
{% if filterDefinitionObject.getFilters() %}
<div class="widget">
{% for filter in filterDefinitionObject.getFilters() %}
{% if filter.getLabel() != 'Country Availability' %}
{{ filterService.getFilterFrontend(filter, products, currentFilter)|raw }}
{% endif %}
{% endfor %}
</div>
{% endif %}
{% if search is defined and search is not empty %}
<input name="search" value="{{ search }}" type="hidden"/>
{% endif %}
</form>
</div>
</div>
</div>
<div class="col-sm-8 col-md-9">
{% include 'Shop/includes/pagination.html.twig' %}
<div class="product-list same-height-holder">
{% include 'Shop/list/products.html.twig' with {'products' : products, 'locale' : locale, 'country' : country, 'lastlogin' : lastlogin, 'preview' : preview, 'editmode' : editmode} %}
</div>
{% include 'Shop/includes/pagination.html.twig' %}
</div>
</div>
</div>
{% endif %}
</div>
{% endblock %}