ACEA C1

Search base:

FREE DELIVERY FOR ORDERS OVER €85

Your order will arrive the same day or the next business day.
(function () { const labels = { selections: { el: 'Επιλεγμένα Φίλτρα', en: 'Selected Filters' }, categories: { el: 'Κατηγορίες', en: 'Categories' }, functions: { el: 'Λειτουργίες', en: 'Functions' }, applications: { el: 'Εφαρμογές', en: 'Applications' }, viscosity: { el: 'Ιξώδες', en: 'Viscosity' }, brands: { el: 'Μάρκες', en: 'Brands' }, manufacturers: { el: 'Κατασκευαστές', en: 'Manufacturers' }, specifications: { el: 'Προδιαγραφές', en: 'Specifications' }, product_clusters: { el: 'Ομάδες Προϊόντων', en: 'Product Clusters' } }; const icons = { selections: '', categories: '', functions: '', applications: '', viscosity: '', brands: '', manufacturers: '', specifications: '', product_clusters: '' }; const clearButtonLabels = { el: 'Καθαρισμός Όλων', en: 'Clear All', fr: 'Tout Réinitialiser' }; function getCurrentLang() { return window.ICL_LANGUAGE_CODE || document.documentElement.lang?.slice(0, 2) || 'en'; } function setClearButtonLabel() { const lang = getCurrentLang(); const label = clearButtonLabels[lang] || clearButtonLabels['en']; const clearBtn = document.querySelector('.facetwp-clear-btn'); if (clearBtn) { clearBtn.textContent = `✖ ${label}`; } } function applyLabels() { const lang = document.documentElement.lang?.slice(0, 2) || 'el'; document.querySelectorAll('.facet-box').forEach(box => { if (box.querySelector('.facet-heading')) return; const facet = box.dataset.facet; const label = labels[facet]?.[lang] || facet; const icon = icons[facet] || ''; const heading = document.createElement('div'); heading.className = 'facet-heading'; heading.innerHTML = `${icon} ${label}`; heading.style.fontWeight = '600'; heading.style.marginBottom = '10px'; heading.style.display = 'flex'; heading.style.alignItems = 'center'; heading.style.gap = '8px'; box.prepend(heading); }); } function hideEmptyFacets() { document.querySelectorAll('.facet-box').forEach(box => { const facetName = box.dataset.facet; const wrapper = box.querySelector('.facetwp-facet'); const hasContent = wrapper && wrapper.innerHTML.trim().length > 0; // ειδική συνθήκη: specifications εμφανίζεται μόνο αν υπάρχει manufacturer /* if (facetName === 'specifications') { const manufacturersSelected = FWP.facets.manufacturers?.length > 0; box.style.display = (hasContent && manufacturersSelected) ? 'block' : 'none'; } else { box.style.display = hasContent ? 'block' : 'none'; } */ }); } function handleSelectionsBox() { const selectionsBox = document.querySelector('.facet-selections-box'); const facets = FWP.facets || {}; const hasSelections = Object.values(facets).some(val => Array.isArray(val) && val.length > 0); if (selectionsBox) { selectionsBox.style.display = hasSelections ? 'block' : 'none'; } } function bindClearButton() { const clearBtn = document.querySelector('.facetwp-clear-btn'); if (clearBtn) { clearBtn.removeEventListener('click', clearBtn._facetHandler); clearBtn._facetHandler = () => FWP.reset(); clearBtn.addEventListener('click', clearBtn._facetHandler); } } document.addEventListener('facetwp-loaded', function () { // Legacy facet headings disabled; headings are managed by the Fluxotic child theme. hideEmptyFacets(); handleSelectionsBox(); bindClearButton(); setClearButtonLabel(); console.log(FWP.facets) const selectedCategories = FWP.facets?.categories || []; if (selectedCategories.length > 0) { console.log('Ο χρήστης μπήκε με προκαθορισμένη κατηγορία:', selectedCategories); // Κάνε ό,τι χρειάζεσαι εδώ... } }); })();