atlas-services / sylius-shop-filter-plugin
Lightweight Sylius shop attribute filters (select) for SME catalogues — Doctrine/MySQL, no Elasticsearch.
Package info
github.com/atlas-services/sylius-shop-filter-plugin
Type:sylius-plugin
pkg:composer/atlas-services/sylius-shop-filter-plugin
Requires
- php: ^8.2
- doctrine/orm: ^2.20 || ^3.0
- sylius/sylius: ^2.2
- symfony/config: ^6.4 || ^7.4 || ^8.0
- symfony/dependency-injection: ^6.4 || ^7.4 || ^8.0
- symfony/filesystem: ^6.4 || ^7.4 || ^8.0
- symfony/form: ^6.4 || ^7.4 || ^8.0
- symfony/http-foundation: ^6.4 || ^7.4 || ^8.0
- symfony/http-kernel: ^6.4 || ^7.4 || ^8.0
- webmozart/assert: ^1.11
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-13 16:39:10 UTC
README
Lightweight product attribute filters for the Sylius shop (select attributes → sidebar), built for SME catalogues.
No Elasticsearch. Doctrine + MySQL 8 (EXISTS + JSON_CONTAINS). Little surface area, little evolution planned.
Requirements
- PHP 8.2+
- Sylius 2.2+
- MySQL 8 (JSON functions)
Comfort target
Designed for TPE/PME shops up to about ~50k products, used mainly on taxon (category) listing pages.
For larger catalogues or advanced faceting (counts, funnel, options/price at scale), prefer BitBag Elasticsearch or Asdoria Facet Filter.
Installation
composer require atlas-services/sylius-shop-filter-plugin php vendor/bin/apply-recipe-shop-filter bin/console cache:clear
With Docker:
make up # or: docker compose up -d
docker compose run --rm php composer require atlas-services/sylius-shop-filter-plugin
docker compose run --rm php php vendor/bin/apply-recipe-shop-filter
docker compose run --rm php bin/console cache:clear
Prefer
docker compose run --rm phpoverexecfor install steps (Sylius convention; more reliable right aftermake up).
Zero-config after that: every product attribute of type select can appear as a filter. On a taxon page, only attributes used by at least one product in that taxon are listed (no artificial cap on how many filters a visitor may apply).
Why the sidebar may be empty
Filters only appear when all of these are true:
- You are on a taxon / category product listing (not the homepage).
- At least one product attribute of type select exists (with choices configured).
- At least one enabled product in that taxon uses that attribute.
With sylius-shop-kit minimal fixtures (empty shop, 0 products), there is nothing to filter — the sidebar stays empty until you add select attributes and products (or load a catalog such as Fashion / Akeneo).
Recommended index
CREATE INDEX IF NOT EXISTS idx_pav_attribute_owner ON sylius_product_attribute_value (attribute_id, product_id);
(Adapt column names if your schema differs; Sylius usually uses attribute_id + product_id / subject mapping.)
What you get
| Piece | Role |
|---|---|
Grid filter product_attribute_select |
Filters listing via EXISTS + JSON_CONTAINS |
| Twig Hook sidebar | Filter form (GET) |
| Main search bar override | Keeps only the text search in the top bar |
License
MIT. See LICENSE.
Developed by Atlas Services.