No results found for the selected filters.
Try changing country or category filters to see more offers.
document.addEventListener('DOMContentLoaded', function () { if (typeof PI_VENDOR_COUNTRIES === 'undefined') return; const select = document.getElementById('pi-country-select'); if (!select) return; // Populate select PI_VENDOR_COUNTRIES.forEach(c => { const opt = document.createElement('option'); opt.value = c.code; opt.innerHTML = `????????? ${c.name}`; opt.textContent = c.name; select.appendChild(opt); }); // Change handler ? trigger Filter Everything select.addEventListener('change', function () { const code = this.value; // Reset all vendor_country filters first document .querySelectorAll('[data-taxonomy="vendor_country"] input[type="checkbox"]') .forEach(cb => cb.checked = false); if (code) { const target = document.querySelector( `[data-taxonomy="vendor_country"] input[value="${code}"]` ); if (target) { target.checked = true; } } // Trigger Filter Everything update document.dispatchEvent(new Event('fe:update')); }); }); //продолжение // document.addEventListener('DOMContentLoaded', function () { const el = document.getElementById('pi-country-select'); if (!el || typeof TomSelect === 'undefined' || typeof PI_VENDOR_COUNTRIES === 'undefined') return; const ts = new TomSelect(el, { valueField: 'value', labelField: 'label', searchField: ['label'], options: PI_VENDOR_COUNTRIES, allowEmptyOption: true, placeholder: 'All countries', closeAfterSelect: true, render: { option: function (item, escape) { return `
No results found for the selected filters.
Try changing country or category filters to see more offers.