Skip to content

This plugin add a banner entity to your Sylius projects.

Notifications You must be signed in to change notification settings

dodo-it/SyliusBannerPlugin

 
 

Repository files navigation

Odiseo
Odiseo Sylius Banner Plugin

Description

This plugin add banners to the Sylius content. The banners are fully customizable by the admin.

Banners admin

Demo

You can see this plugin in action in our Sylius Demo application.

Installation

  1. Run composer require odiseoteam/sylius-banner-plugin.

  2. 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);
}
  1. Import the configurations on your config.yml:
    - { resource: "@OdiseoSyliusBannerPlugin/Resources/config/config.yml" }
  1. 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
  1. 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

Test the plugin

You can follow the instructions to test this plugins in the proper documentation page: Test the plugin.

Credits

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.

About

This plugin add a banner entity to your Sylius projects.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 89.2%
  • JavaScript 4.6%
  • HTML 4.0%
  • Gherkin 2.2%