Setono example plugin for Sylius.


Latest Version Latest Unstable Version Software License Build Status Code Coverage

Integrate Google Optimize with your Sylius store the right way!

Installing the plugin

composer require setono/sylius-google-optimize-plugin

Enabling the plugin

If you have Flex enabled the composer require will automatically add the bundles and the plugin to bundles.php. If not you should manually add them:

    // ...

    Setono\SyliusGoogleOptimizePlugin\SetonoSyliusGoogleOptimizePlugin::class => ['all' => true],
    Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
    // ...

NOTICE: It's important that you add the plugin before the SyliusGridBundle.

Add configuration file

Create the file config/packages/setono_sylius_google_optimize.yaml and add the following:

# config/packages/setono_sylius_google_optimize.yaml
    - { resource: "@SetonoSyliusGoogleOptimizePlugin/Resources/config/app/config.yaml" }

Include routes configuration

Create the file config/routes/setono_sylius_google_optimize.yaml and add the following:

# config/routes/setono_sylius_google_optimize.yaml
    resource: "@SetonoSyliusGoogleOptimizePlugin/Resources/config/routes.yaml"

The plugin also provides a routes file for non localized stores. All you do is to use @SetonoSyliusGoogleOptimizePlugin/Resources/config/routes_no_locale.yaml instead of @SetonoSyliusGoogleOptimizePlugin/Resources/config/routes.yaml