iranimij / openfilter
OpenFilter: layered navigation for Magento 2 and Hyvä. Multi-select filters with correct counts, AJAX that is cache- and CSP-correct, price slider, SEO-safe URLs. Built on the OpenSearch Magento ships. Free and MIT.
Requires
- php: ~8.2.0 || ~8.3.0 || ~8.4.0
- iranimij/module-base: ^1.0
- magento/framework: ^103.0.7
- magento/module-advanced-search: ^100.4.5
- magento/module-backend: ^102.0.7
- magento/module-catalog: ^104.0.7
- magento/module-catalog-inventory: ^100.4.7
- magento/module-catalog-search: ^102.0.7
- magento/module-config: ^101.2.7
- magento/module-customer: ^103.0.7
- magento/module-eav: ^102.1.7
- magento/module-elasticsearch: ^101.0.7
- magento/module-review: ^100.4.7
- magento/module-search: ^101.1.7
- magento/module-sitemap: ^100.4
- magento/module-store: ^101.1.7
- magento/module-swatches: ^100.4.7
- magento/module-tax: ^100.4.7
- magento/module-theme: ^101.1.7
- magento/module-ui: ^101.2.7
- magento/module-url-rewrite: ^102.0
Requires (Dev)
- magento/module-catalog-graph-ql: ^100.4.7
Suggests
- iranimij/openfilter-hyva: Storefront rendering for Hyvä themes (AJAX, mobile drawer, sliders)
- magento/module-catalog-graph-ql: Headless storefronts: products { openfilter_aggregations } in GraphQL
Provides
None
Conflicts
None
Replaces
None
- dev-main / 1.1.x-dev
- v1.1.0
- v1.1.0-rc1
- v1.0.0
- v1.0.0-rc1
- dev-release/1.1.0
- dev-ci/path-version
- dev-release/1.1.0-rc1
- dev-feat/m5-s12-close
- dev-feat/m5-s13-review
- dev-feat/m5-s10-headless
- dev-feat/m5-s11-bench
- dev-feat/m5-s9-rest
- dev-feat/m5-s0-store-scope
- dev-feat/m5-s1-config
- dev-feat/m5-s2-and-logic
- dev-feat/m5-s3-ranges
- dev-feat/m5-s4-category
- dev-feat/m5-s5-admin
- dev-feat/m5-s6-storefront
- dev-feat/m5-s7-seo
- dev-feat/m5-s8-graphql
- dev-release/1.0.0
- dev-release/1.0.0-rc1
This package is auto-updated.
Last update: 2026-10-16 01:20:19 UTC
README
The layered navigation shops pay for, free. Multi-select filters with correct counts, AJAX that Varnish can cache and Hyvä's Content Security Policy allows, sliders, rating / stock / sale / new filters, a mobile drawer and SEO rules, on the OpenSearch Magento already ships. MIT, no licence key, no paid tier.
- One search request per filtered page. Counts are disjunctive (the options of a filter you use are counted as if it were not set) and come from the same OpenSearch request as the products, the counts of every other filter and the slider bounds. No extra MySQL queries.
- AJAX served from your page cache. A filter click fetches the same URL a normal page load would, so Varnish or the built-in cache answers it. One small Alpine component (5.9 KB gzipped), registered with Hyvä's CSP helper: no inline handlers, no
eval, no inline styles. - Works without JavaScript. Every option is a real link, every slider a form: crawlers, screen readers and failed scripts get the same filters.
Install
Requires Magento Open Source, Adobe Commerce or Mage-OS 2.4.7–2.4.9, PHP 8.2–8.4, OpenSearch (or Elasticsearch 8 on 2.4.7) and a Hyvä theme 1.4 or 1.5. From the Magento root:
composer require iranimij/openfilter-hyva-bundle bin/magento setup:upgrade bin/magento indexer:reindex catalogsearch_fulltext
In production mode also run bin/magento setup:di:compile and bin/magento setup:static-content:deploy. Details: Install.
Quick start
- Catalog › OpenFilter › Filters lists your filterable attributes and the built-in filters with sensible defaults: colour as a swatch multi-select, size as a text swatch multi-select, price as a slider, other selects as lists, Yes/No attributes as switches. Click Review defaults.
- Open a category: filters update the results in place, the URL stays readable (
/women/tops-women.html?color=black,blue&size=m), Back restores the previous filters and the scroll position. - Mark the filters whose single values deserve a search result (brand, colour) as Let Google index pages filtered by this. Everything else stays
NOINDEX,FOLLOW. - Run
bin/magento openfilter:doctoronce: it checks the search engine, the cache and every filter, and says how to fix what it finds.
What you get
| Filters | multi-select per attribute (OR), single-select option, swatches (colour, image, text), lists with "Show more" and a search box, price and decimal sliders with from–to fields (display currency and tax aware), rating "4 stars and up", in stock (MSI-aware), on sale (per customer group and website), new, category drill-down; category and search result pages |
| Storefront (Hyvä 1.4 and 1.5) | AJAX with Back/Forward and scroll restore, chips and Clear all, mobile drawer with "Show 123 products" counted before you apply, keyboard and screen reader support (axe-clean), right-to-left, no layout shift, no Tailwind rebuild |
| SEO | readable store-scoped URL names (Grün → gruen), one canonical URL per page (301), robots and canonical tags, rel="nofollow" beyond 2 active values, at most 5 values per URL (302) |
| Admin | Filters grid with inline edit, a form per filter (how it looks, how it behaves, SEO, labels per store view), settings on the attribute page, "Why is this filter not showing?" |
| Operations | openfilter:doctor, openfilter:slugs:generate, openfilter:config:export / import (JSON, dry run, all or nothing), var/log/openfilter.log, debug mode |
Tested together with OpenLabel (free product labels): labels survive every filter update.
Compared with paid modules
From each vendor's public product page and documentation on 2026-10-13; features change, so check before you decide. Product names belong to their owners; OpenFilter is not affiliated with any of them.
| OpenFilter | Amasty Improved Layered Navigation | Mirasvit Layered Navigation | Mageplaza Layered Navigation | ElasticSuite | |
|---|---|---|---|---|---|
| Price | free, MIT | $109–$579 per year | $199–$580 | $149–$399 (first year) | free, OSL |
| Search engine | Magento's OpenSearch | Magento's | Magento's | Magento's | its own search stack |
| Multi-select with correct counts | yes | yes | yes | yes | yes |
| AJAX on Hyvä with its CSP package | yes | stated as not supported | Hyvä support stated | Hyvä compatibility stated | no AJAX |
| Filters work without JavaScript | yes | not documented | not documented | not documented | yes (no AJAX) |
| Canonical and robots rules | yes | yes | yes | Pro edition | no |
| Limit on combined filter values | yes | not documented | yes | not documented | no |
| Rating, stock, sale, new filters | yes | yes | yes | Pro edition | no |
Paid modules offer more in their higher tiers (brand and landing pages, infinite scroll, analytics). OpenFilter 1.1 adds "match all" filters, price ranges, a category tree, per-category visibility, horizontal and apply-button layouts, title/description/H1 templates, an XML sitemap of indexable filter pages, GraphQL for headless storefronts and a REST API; the roadmap brings path URLs, landing pages and a Luma package in 1.2. How it compares on speed with Magento's own layered navigation: benchmark.
SEO notes
Faceted navigation can flood search engines with near-duplicate pages. OpenFilter's defaults keep every filtered page NOINDEX,FOLLOW except single values you mark, point canonicals at the category, stop crawlers from following links beyond 2 active values and redirect URLs with more than 5. The head is updated after every AJAX swap, so the browser always shows what a crawler sees for that URL. SEO rules.
Cache notes
Filtered pages are ordinary GET pages: Varnish and the built-in page cache store them per URL and customer group, exactly as any category page. Filter clicks fetch those cached URLs, and a response cache in the browser serves Back and Forward instantly. Filter settings and URL names live in their own cache type (openfilter), cleaned on save; storefront settings mark the full page cache for refresh. No private content, no extra cache rules.
Documentation
Install · Filters · Admin · Storefront and theming · Filter URLs · SEO rules · Command line · Import and export · Troubleshooting · Other search modules · Upgrade and uninstall · CHANGELOG
Site: https://iranimij.github.io/openfilter/
Support
Issues are triaged within 7 days; there is no SLA. Report bugs and ideas in GitHub issues, security problems privately (SECURITY.md). Contributions are welcome: CONTRIBUTING.md (clean-room rule included).
Licence
MIT, see LICENSE and NOTICE. Not affiliated with, endorsed by or sponsored by Hyvä Themes B.V., Adobe Inc. or the Mage-OS Association.
