Search by

atlas-services / sylius-shop-filter-plugin

atlas-services

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

Statistics

Installs: 16

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-08-10 14:32 UTC

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 php over exec for install steps (Sylius convention; more reliable right after make 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:

  1. You are on a taxon / category product listing (not the homepage).
  2. At least one product attribute of type select exists (with choices configured).
  3. 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.