Skip to content
No description or website provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
etc/build
features
spec
src
tests
.gitignore
.scrutinizer.yml
.travis.yml
LICENSE
README.md
behat.yml.dist
composer.json
easy-coding-standard.yml
node_modules
phpspec.yml.dist
phpstan.neon
phpunit.xml.dist

README.md

Sylius Redirect Plugin

Latest Version on Packagist Software License Build Status Quality Score

Gives you the ability to manage redirects in your Sylius shop.

Installation

Step 1: Download the plugin

Open a command console, enter your project directory and execute the following command to download the latest stable version of this plugin:

$ composer require setono/sylius-redirect-plugin

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Enable the plugin

Then, enable the plugin by adding it to the list of registered plugins/bundles in the config/bundles.php file of your project:

<?php

return [
    // ...
    
    // Add before SyliusGridBundle
    Setono\SyliusRedirectPlugin\SetonoSyliusRedirectPlugin::class => ['all' => true],
    Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
    
    // ...
];

It is IMPORTANT to add the plugin before the grid bundle else you will get a an exception saying You have requested a non-existent parameter "setono_sylius_redirect.model.redirect.class".

Step 3: Add configuration

# config/routes/setono_sylius_redirect.yaml

setono_sylius_redirect_admin:
    resource: "@SetonoSyliusRedirectPlugin/Resources/config/admin_routing.yaml"
    prefix: /admin
# config/packages/_sylius.yaml
imports:
    # ...
    
    - { resource: "@SetonoSyliusRedirectPlugin/Resources/config/config.yaml" }
    
    # ...

Step 4: Update database

Use Dotrine migrations to create a migration file and update the database.

$ bin/console doctrine:migrations:diff
$ bin/console doctrine:migrations:migrate

Contributors

You can’t perform that action at this time.