{% extends "base.html.twig" %} {% block title %} {% if current_category_name %} {{ current_category_name }} - {{ site_title }} {% else %} {% if current_lang == 'en' %}Home{% else %}Αρχική{% endif %} - {{ site_title }} {% endif %} {% endblock %} {% block extra_css %} {% endblock %} {% block content %} {% if search_query is defined and search_query != '' %}

{% if current_lang == 'en' %}Search results for:{% else %}Αποτελέσματα αναζήτησης για:{% endif %} "{{ search_query }}"

{% if current_lang == 'en' %}Found {{ total_products }} products.{% else %}Βρέθηκαν {{ total_products }} προϊόντα.{% endif %}

{% endif %} {% if current_category_name %}

{{ text.category_title_prefix|default('Κατηγορία:') }} {{ current_category_name }}

{{ text.category_subtitle_prefix|default('Εμφάνιση εξοπλισμού για') }} {{ current_category_name }}

{% if category_id %} {% endif %} {% if search_query %} {% endif %}
-
{% if category_attributes %} {% for attr in category_attributes %} {% set attr_values = attr.distinct_values|split('||') %} {% if attr_values|length > 0 and attr.distinct_values != '' %}
{% endif %} {% endfor %} {% endif %}
{% if filters.sort or filters.min_price or filters.max_price or filters.attr %} ✖ {% if current_lang == 'en' %}Clear Filters{% else %}Καθαρισμός{% endif %} {% endif %}
{% elseif search_query is empty %}

{{ text.site_slogan|default('Βρες τον καλύτερο εξοπλισμό Χόκεϊ!') }}

{{ text.site_sub_slogan|default('Αγορά και πώληση καινούργιου & μεταχειρισμένου εξοπλισμού.') }}

{{ text.title_new_arrivals|default('Νέες Αφίξεις') }}

{% endif %}
{% for product in products %}
{% if product.image_path %} {{ product.title }} {% else %}
No Image
{% endif %}

{{ product.title }}

{% if product.sku %}
SKU: {{ product.sku }}
{% endif %}
{{ product.price|number_format(2, ',', '.') }} €
{% if product.attributes is not empty %} {% for attr in product.attributes %} {{ attr.name }}: {{ attr.value }}{{ attr.unit ? ' ' ~ attr.unit : '' }} {% endfor %} {% endif %}
{{ text.btn_view_product|default('Προβολή') }}
{% else %}
{% if current_lang == 'en' %} No products found in this category. {% else %} Δεν βρέθηκαν διαθέσιμα προϊόντα. {% endif %}
{% endfor %}
{% if total_pages > 1 %}
{% if current_page > 1 %} « {% if current_lang == 'en' %}Prev{% else %}Προηγ.{% endif %} {% endif %} {# Έξυπνη εμφάνιση σελίδων (κρύβει τις ενδιάμεσες αν είναι πάνω από 5) #} {% set start_page = max(1, current_page - 2) %} {% set end_page = min(total_pages, current_page + 2) %} {% if start_page > 1 %} 1 {% if start_page > 2 %}...{% endif %} {% endif %} {% for p in start_page..end_page %} {{ p }} {% endfor %} {% if end_page < total_pages %} {% if end_page < total_pages - 1 %}...{% endif %} {{ total_pages }} {% endif %} {% if current_page < total_pages %} {% if current_lang == 'en' %}Next{% else %}Επόμ.{% endif %} » {% endif %}
{% endif %} {% endblock %}