This plugin add banners to the Sylius content. The banners are fully customizable by the admin.
You can see this plugin in action in our Sylius Demo application.
- Frontend: sylius-demo.odiseo.com.ar.
- Administration: sylius-demo.odiseo.com.ar/admin with
odiseo: odiseo
credentials.
-
Run
composer require odiseoteam/sylius-banner-plugin
. -
Add the plugin to the AppKernel but add it before SyliusResourceBundle. To do that you need change the registerBundles like this:
public function registerBundles(): array
{
$preResourceBundles = [
new \Odiseo\SyliusBannerPlugin\OdiseoSyliusBannerPlugin(),
];
$bundles = [
...
//This plugin use the vich uploader bundle
new \Vich\UploaderBundle\VichUploaderBundle(),
];
return array_merge($preResourceBundles, parent::registerBundles(), $bundles);
}
- Import the configurations on your config.yml:
- { resource: "@OdiseoSyliusBannerPlugin/Resources/config/config.yml" }
- Add the admin and shop routes:
odiseo_sylius_banner_admin:
resource: "@OdiseoSyliusBannerPlugin/Resources/config/routing/admin.yml"
prefix: /admin
odiseo_sylius_banner_shop:
resource: "@OdiseoSyliusBannerPlugin/Resources/config/routing/shop.yml"
prefix: /{_locale}/banner
- Finish the installation updatating the database schema and installing assets:
php bin/console doctrine:schema:update --force
php bin/console assets:install
php bin/console sylius:theme:assets:install
## Fixtures
This plugin comes with fixtures:
### Banners
Simply add this configuration on your fixture suite:
```yml
banner:
options:
banners_per_channel: 12
You can follow the instructions to test this plugins in the proper documentation page: Test the plugin.
This plugin is maintained by Odiseo. Want us to help you with this plugin or any Sylius project? Contact us on team@odiseo.com.ar.