BatteryIncluded Sylius Plugin
Brings BatteryIncluded into your Sylius 2 shop: a search page with filters and sorting, search-as-you-type suggestions in the header, category pages served by BatteryIncluded and product recommendations on the product page and in the cart. With the Sylius CMS plugin its pages are searchable as well. The plugin is built on the BatteryIncluded Symfony Bundle, which exports your catalog and talks to the API.
composer require eiling-io/sylius-battery-included-plugin:dev-main
bin/console bi:export --force
What’s inside
| Topic | Content |
|---|---|
| Getting started | Installation, credentials, routes, assets, first export |
| Configuration | Channels and collections, all options of the bundle |
| Shop features | Search page, suggestions, category pages, recommendations, sliders |
| Export & sync | Exported fields, bi:export, bi:sync, portal configuration |
| CMS pages | Pages of the Sylius CMS plugin in the search and the suggestions, if installed |
| Extending the plugin | Templates, Twig hooks, own fields and documents, services |
| Development | ddev, tests, static analysis, CI |
How it fits together
| Package | Responsibility |
|---|---|
| Sylius Plugin (this one) | Products of a channel as documents, shop pages, Twig components, channel to collection mapping |
| Symfony Bundle | Configuration, collections, console commands, events, profiler |
| PHP SDK | API client, DTOs, search structs and responses |
Whatever the plugin does not cover itself is configured and extended through the bundle, see Extending the plugin.
For AI coding agents
Let your agent read llms-full.txt: installation, configuration, exported fields and extension points in one file. llms.txt lists all pages of this documentation.
Requirements
- PHP 8.2 or higher (8.3 with Sylius 2.3)
- Sylius 2.2 or 2.3, Symfony 7.4
- A BatteryIncluded collection and its API key