Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require setono/sylius-feed-plugin
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Then, enable the plugin by adding it to the list of registered plugins/bundles
in the app/AppKernel.php
file of your project:
<?php
// app/AppKernel.php
use Sylius\Bundle\CoreBundle\Application\Kernel;
final class AppKernel extends Kernel
{
public function registerBundles(): array
{
return array_merge(parent::registerBundles(), [
// ...
new \Setono\SyliusFeedPlugin\SetonoSyliusFeedPlugin(),
// ...
]);
}
// ...
}
# app/config/config.yml
imports:
# ...
- { resource: "@SetonoSyliusFeedPlugin/Resources/config/config.yml" }
setono_sylius_feed:
dir: "%kernel.project_dir%/var/feeds"
# app/config/routing.yml
# ...
setono_sylius_feed:
resource: "@SetonoSyliusFeedPlugin/Resources/config/routing.yml"
$ php bin/console doctrine:schema:update --force
or use Doctrine Migrations.
- Go to
/admin/feeds/
and create a new feed. - Run this command to generate your feed(s):
php bin/console setono:feed:generate
- Now you can download your newly generated feed here:
/en_US/feed/test
assuming that your locale isen_US
and that the slug of the feed istest
- Select the resource that should be used to create the feed
- Select which attributes should be included in the feed
- Use twig templates instead of hardcoding into command