atlas-services / sylius-shop-kit-plugin
Bootstrap Sylius shop front: EUR/fr_FR defaults, footer, logo, taxon menu, listing layout and editable Twig copies.
Package info
github.com/atlas-services/sylius-shop-kit-plugin
Language:Twig
Type:sylius-plugin
pkg:composer/atlas-services/sylius-shop-kit-plugin
Requires
- php: ^8.2
- sylius/sylius: ^2.2
- symfony/console: ^6.4 || ^7.4 || ^8.0
- symfony/filesystem: ^6.4 || ^7.4 || ^8.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Bootstrap a Sylius shop front with Atlas defaults: footer, logo, top bar, homepage banner, static legal pages, taxon menu (home first), listing layout, and EUR / fr_FR as the shop defaults.
This package does not force templates at runtime. You run an init command that copies files into your project. Existing files are skipped unless you pass --force or confirm overwrite.
It also ships a minimal fixture suite (same pattern as the coffee / fashion / restaurant projects): empty shop — no Sylius Fashion catalog.
Requirements
- PHP 8.2+
- Sylius 2.2+
Installation
composer require atlas-services/sylius-shop-kit-plugin php vendor/bin/apply-recipe-shop-kit bin/console atlas:shop-kit:init bin/console cache:clear
With Docker (existing Sylius project — no nodejs needed; the plugin ships no JS/CSS):
make up # or: docker compose up -d
docker compose run --rm php composer require atlas-services/sylius-shop-kit-plugin
docker compose run --rm php php vendor/bin/apply-recipe-shop-kit
docker compose run --rm php bin/console atlas:shop-kit:init
docker compose run --rm php bin/console cache:clear
With Docker (fresh project — empty shop, no Fashion catalog):
Do not use make init: it runs sylius:install -s default (Fashion demo catalog). Use this flow instead:
cp compose.override.dist.yml compose.override.yml # if not already done make up # or: docker compose up -d docker compose run --rm php composer install --no-interaction docker compose run --rm php composer require atlas-services/sylius-shop-kit-plugin docker compose run --rm php php vendor/bin/apply-recipe-shop-kit docker compose run --rm nodejs # yarn install + yarn build (Sylius shop/admin CSS/JS) docker compose run --rm php bin/console atlas:shop-kit:init -n # copies sylius_fixtures.yaml → minimal suite docker compose run --rm php bin/console sylius:install -s minimal -n docker compose run --rm php bin/console sylius:admin-user:create docker compose run --rm php bin/console cache:clear
nodejsbuilds Sylius front-end assets (Webpack Encore), not this plugin. The shop kit only ships Twig, YAML, PHP and static images (logo.webp). On a fresh project, runnodejsonce — that is the only useful part of Syliusmake initto reuse here (without the demo catalog).
Prefer
docker compose run --rm phpoverexecfor install steps (Sylius convention; more reliable right aftermake up).
Empty shop (no Fashion catalog)
atlas:shop-kit:init copies config/packages/sylius_fixtures.yaml with suite minimal (channel + locales + menu taxon, 0 products). The channel uses fr_FR as default locale and EUR as base currency. Edit channel code / hostname there if needed.
Also copied: config/packages/atlas_shop_defaults.yaml (locale: fr_FR, sylius_installer_currency: EUR, listing grid 8/16/24).
Order matters: run atlas:shop-kit:init before sylius:install, otherwise the minimal suite does not exist yet.
bin/console atlas:shop-kit:init -n bin/console sylius:install -s minimal -n bin/console sylius:admin-user:create
Or reload fixtures only (wipes shop data):
bin/console sylius:fixtures:load minimal -n
Docker Makefile — replace make init with init-minimal:
# Do not use the standard Sylius make init (sylius:install -s default = Fashion catalog). init-minimal: @cp -n compose.override.dist.yml compose.override.yml 2>/dev/null || true @$(DOCKER_COMPOSE) up -d @$(DOCKER_COMPOSE) run --rm php composer install --no-interaction @$(DOCKER_COMPOSE) run --rm php composer require atlas-services/sylius-shop-kit-plugin @$(DOCKER_COMPOSE) run --rm php php vendor/bin/apply-recipe-shop-kit @$(DOCKER_COMPOSE) run --rm nodejs @$(DOCKER_COMPOSE) run --rm php bin/console atlas:shop-kit:init -n @$(DOCKER_COMPOSE) run --rm php bin/console sylius:install -s minimal -n @$(DOCKER_COMPOSE) run --rm php bin/console sylius:admin-user:create install: @$(DOCKER_COMPOSE) run --rm php bin/console sylius:install -s minimal -n bootstrap-minimal: @$(DOCKER_COMPOSE) run --rm php bin/console doctrine:database:create --if-not-exists @$(DOCKER_COMPOSE) run --rm php bin/console doctrine:migrations:migrate --no-interaction @$(DOCKER_COMPOSE) run --rm php bin/console sylius:fixtures:load minimal -n @$(DOCKER_COMPOSE) run --rm php bin/console sylius:admin-user:create
Init options
bin/console atlas:shop-kit:init # demo by default (interactive profile choice on TTY) bin/console atlas:shop-kit:init -n # never ask, use demo, skip existing bin/console atlas:shop-kit:init --legal-profile=demo # fictional Ma Société / masociete.com bin/console atlas:shop-kit:init --legal-profile=atlas # Atlas Services legal info, no phone number bin/console atlas:shop-kit:init --force # overwrite everything
Legal profiles
| Profile | Content |
|---|---|
demo (default) |
Purely fictional values (Ma Société, contact@masociete.com, fake SIREN…). Safe for demos / Packagist tryouts. |
atlas |
Real Atlas Services company details (SIREN, address, email…). No phone number. Publication director is generic (“Le gérant”). |
All company strings live under app.legal.* in translations/messages.{fr,en}.yaml — edit after init. Static legal page copy (labels, body text) lives under app.mentions.*, app.privacy.*, app.cookies_page.*, app.cgu_page.*, app.cgv_page.*, app.a11y.* — fully translated FR/EN.
What gets created
| Path | Role |
|---|---|
config/packages/atlas_shop_kit.yaml |
Twig hooks (footer, logo, banner, homepage latest_ off*, navbar home + taxons) |
config/packages/atlas_shop_defaults.yaml |
locale: fr_FR, installer currency EUR, listing grid 8/16/24 |
config/packages/sylius_fixtures.yaml |
Suite minimal (EUR + fr_FR as channel defaults) |
src/Controller/Shop/StaticPageController.php |
Routes for legal / static pages |
templates/shop/homepage/banner.html.twig |
Homepage banner |
templates/shop/shared/logo.html.twig |
Logo |
templates/shop/shared/layout/base/header/navbar/** |
Taxon menu: home icon first, mx-sm-4 spacing |
templates/shop/shared/layout/base/footer/** |
Footer parts (links to static routes) |
templates/shop/product/index/** |
Listing H1, optional taxon description, 4-column grid, breadcrumbs without Accueil/Category |
templates/shop/grid/filter/string.html.twig |
Search placeholder « Rechercher » / « Search » |
templates/shop/static/** |
Legal notice, terms of sale, terms of use, privacy, cookies, a11y, FAQ, sitemap |
templates/shop/product/common/list.html.twig |
Product list (if you re-enable latest deals / products) |
translations/messages.{en,fr}.yaml |
UI + app.legal.* (from chosen profile) |
public/media/homepage/, public/media/logo/ |
Asset folders |
public/media/logo/logo.webp |
Default Atlas Services logo |
Homepage latest deals and latest products are copied as enabled: false. Re-enable them in atlas_shop_kit.yaml if needed. Override app.taxon.products_heading (default %taxon%) for a listing prefix such as Parfum %taxon%.
Replace the logo or drop a banner at public/media/homepage/banner.jpg as needed.
Existing projects
Safe: atlas:shop-kit:init only creates missing files. Your custom Twig and hooks stay untouched.
On a shop already initialised with 0.2.x, a new init (without --force) will add the new v1 files (atlas_shop_defaults.yaml, navbar, listing templates, …) but skip atlas_shop_kit.yaml. Merge the homepage latest_* enabled: false and navbar hooks by hand, or pass --force only if you intend to overwrite hooks.
To switch legal profile later:
bin/console atlas:shop-kit:init --legal-profile=demo --force
# or overwrite only translations interactively
License
MIT. See LICENSE.
Developed by Atlas Services.