ITG Filter Easy

Описание

ITG Filter Easy is an Elementor widget for WooCommerce product filtering. It works as a sidebar filter — it does not output products itself, but modifies the existing WooCommerce Products widget output via URL parameters and pre_get_posts, with full AJAX support (no page reload).

Ключевые возможности:

  • Фильтрация по категориям, атрибутам (pa_*), диапазону цен, бренду, наличию, распродаже и текстовому поиску
  • AJAX-обновление — список товаров обновляется без перезагрузки страницы
  • Фасетные счётчики — количество товаров у каждого варианта обновляется после каждого изменения фильтра
  • Поддержка истории браузера — кнопки «Назад» и «Вперёд» работают корректно
  • Конвертация валюты бренда — цены, хранящиеся в валюте бренда, автоматически пересчитываются в активную валюту WooCommerce по настраиваемому источнику курса
  • Режим авто-фильтра — фильтры применяются мгновенно при изменении, без кнопки отправки
  • В комплекте 5 переводов: русский, немецкий, французский, испанский, китайский
  • 16 хуков-фильтров для разработчиков
  • Совместим с HPOS (High-Performance Order Storage)

Configuration

Все настройки задаются в WooCommerce ITG Filter (а не в самом виджете). В виджете доступен только элемент управления Селектор товаров.

Вкладка «Структура»

Defines which filters appear in the widget and in what order. Drag rows to reorder.

Fields: Attribute, Display type (checkbox / radio / button / select / multiselect / range), Label, Heading, Open, Count, Sort, «All» option, Items, Hint.

Built-in filter types: Category, Price, Brand, Sort by, Stock, Sale, Text search. Product attributes (pa_*) are listed automatically.

Вкладка «Параметры»

Auto-filter, Hide empty, Shadow under group heading, Show hints, Group icon side, Group icon style, Brand currency, Exchange rate URL.

Вкладка «Дополнительно»

Shows the current plugin version and update source URL.

Developer Hooks

Settings

  • itg_flt_defaults — Override default settings values
  • itg_flt_settings — Filter the full settings array after loading

Currency

  • itg_flt_brand_currency — Override the currency code for a brand term
  • itg_flt_pivot_rate — Override the exchange rate for a currency code
  • itg_flt_converted_price — Filter the final converted price
  • itg_flt_convert_price_enabled — Disable price conversion for specific products

Query

  • itg_flt_allowed_orderby — Add custom orderby values to the whitelist
  • itg_flt_sanitize_params — Post-process sanitized filter parameters
  • itg_flt_tax_query — Modify tax_query before it is applied to WP_Query
  • itg_flt_meta_query — Modify meta_query before it is applied to WP_Query
  • itg_flt_filtered_counts — Post-process the faceted term counts array

AJAX

  • itg_flt_ajax_query_args — Modify WP_Query args before the AJAX product query runs
  • itg_flt_ajax_response — Modify the AJAX JSON response before it is sent

Price

  • itg_flt_price_range — Override the computed min/max price range for the slider
  • itg_flt_price_range_cache_ttl — Change the transient cache lifetime for the price range

Frontend

  • itg_flt_script_data — Add extra data to the JS object passed to the frontend script

Установка

  1. Загрузите папку itg-filter-easy в каталог /wp-content/plugins/.
  2. Активируйте плагин через меню Плагины в WordPress.
  3. Перейдите в WooCommerce ITG Filter, чтобы настроить структуру фильтра и параметры.
  4. В Elementor перетащите виджет ITG Filter Easy в боковую панель шаблона страницы каталога.
  5. В настройках виджета укажите Селектор товаров — CSS-селектор контейнера виджета «Товары WooCommerce» (по умолчанию: .elementor-widget-woocommerce-products).

Часто задаваемые вопросы

Выводит ли этот плагин товары?

Нет. Он только фильтрует вывод уже размещённого на той же странице виджета «Товары WooCommerce». Сначала добавьте виджет «Товары WooCommerce» в шаблон Elementor, затем добавьте ITG Filter Easy в боковую панель.

Какой CSS-селектор использовать?

Селектор по умолчанию .elementor-widget-woocommerce-products подходит для большинства случаев. Если на странице несколько виджетов товаров, используйте более точный селектор (например, добавьте свой CSS-класс к обёртке виджета в Elementor).

Работает ли он без Elementor?

Нет. Виджет создан для Elementor. Требуется Elementor (бесплатная версия).

Требуется ли WooCommerce?

Да. Требуется WooCommerce 7.0 или новее.

Как добавить перевод?

Скопируйте languages/itg-filter-easy.pot, переведите его в Poedit и сохраните как itg-filter-easy-{locale}.po. Скомпилируйте в .mo в той же папке.

Отзывы

Нет отзывов об этом плагине.

Участники и разработчики

«ITG Filter Easy» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники

Перевести «ITG Filter Easy» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений

1.2.8

  • Added: README.md and readme.txt with full documentation

1.2.7

  • Moved donate block immediately after License section on Help — Overview tab

1.2.6

  • Fixed: PHP syntax error in itg-flt-settings-tail.php

1.2.5

  • Added: Donate block on Help — Overview tab (USDT TRC-20, clickable address, Copy button)

1.2.4

  • Added: License section on Help — Overview tab (GNU GPL v2)

1.2.3

  • Removed: all references to external exchange rate service
  • Exchange rate URL is now fully configurable

1.2.2

  • Added: GNU GPL v2 license header
  • Added: Exchange rate URL setting with localization in 5 languages

1.2.1

  • Fixed: download URL in auto-update info always matches the ZIP filename

1.2.0

  • Fixed: ZIP compiled with forward slashes for correct extraction on Linux servers
  • Fixed: nonce verified only once in update check handler

1.1.0

  • Per-request in-memory cache for query, price range and sale IDs
  • 5 localizations: ru_RU, fr_FR, de_DE, es_ES, zh_CN
  • Settings modal: single-column layout, compact labels
  • Mobile: WCAG tap targets
  • 16 хуков-фильтров для разработчиков
  • All UI strings in English

1.0.0

  • Initial release