setono / sylius-feed-plugin
Plugin to generate feeds within the Sylius ecommerce platform
Fund package maintenance!
Setono
Installs: 372 986
Dependents: 0
Suggesters: 0
Security: 0
Stars: 24
Watchers: 2
Forks: 46
Open Issues: 24
Type:symfony-bundle
Requires
- php: >=8.1
- ext-json: *
- doctrine/collections: ^1.6
- doctrine/orm: ^2.7
- doctrine/persistence: ^1.3 || ^2.0
- knplabs/knp-menu: ^3.1
- league/flysystem: ^1.1 || ^2.1
- league/flysystem-bundle: ^1.1 || ^2.4
- liip/imagine-bundle: ^2.4
- psr/event-dispatcher: ^1.0
- psr/log: ^1.0 || ^2.0 || ^3.0
- setono/doctrine-orm-batcher: ^0.6
- setono/doctrine-orm-batcher-bundle: ^0.3.4
- setono/symfony-main-request-trait: ^1.0
- spatie/enum: ^3.7
- sylius/resource-bundle: ^1.6
- symfony/config: ^5.4 || ^6.3
- symfony/console: ^5.4 || ^6.3
- symfony/dependency-injection: ^5.4 || ^6.3
- symfony/event-dispatcher: ^5.4 || ^6.3
- symfony/event-dispatcher-contracts: ^1.1 || ^2.2 || ^3.0
- symfony/form: ^5.4 || ^6.3
- symfony/http-foundation: ^5.4.7 || ^6.3
- symfony/http-kernel: ^5.4 || ^6.3
- symfony/messenger: ^5.4 || ^6.3
- symfony/mime: ^5.4 || ^6.3
- symfony/options-resolver: ^5.4 || ^6.3
- symfony/routing: ^5.4 || ^6.3
- symfony/serializer: ^5.4 || ^6.3
- symfony/translation-contracts: ^1.1 || ^2.3 || ^3.0
- symfony/uid: ^5.4 || ^6.3
- symfony/validator: ^5.4 || ^6.3
- symfony/workflow: ^5.4 || ^6.3
- twig/twig: ^2.14 || ^3.0
- webmozart/assert: ^1.1
Requires (Dev)
- api-platform/core: ^2.6
- lexik/jwt-authentication-bundle: ^2.15
- php-http/message-factory: ^1.1
- phpspec/phpspec: ^7.2
- phpunit/phpunit: ^9.5
- polishsymfonycommunity/symfony-mocker-container: ^1.0
- psalm/plugin-phpunit: ^0.18
- psalm/plugin-symfony: ^5.0
- setono/code-quality-pack: ^2.4
- setono/sylius-behat-pack: ^0.2
- sylius/sylius: ^1.11
- symfony/debug-bundle: ^5.4 || ^6.3
- symfony/dotenv: ^5.4 || ^6.3
- symfony/intl: ^5.4 || ^6.3
- symfony/web-profiler-bundle: ^5.4 || ^6.3
- symfony/webpack-encore-bundle: ^1.17
- weirdan/doctrine-psalm-plugin: ^2.2
- dev-master / 1.0.x-dev
- v0.6.19
- v0.6.18
- v0.6.17
- v0.6.16
- v0.6.15
- v0.6.14
- v0.6.13
- v0.6.12
- v0.6.11
- v0.6.10
- v0.6.9
- v0.6.8
- v0.6.7
- v0.6.6
- v0.6.5
- v0.6.4
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.1
- v0.5.0
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.1
- v0.3.0
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.0
- dev-rewrite
- dev-dependabot/composer/psalm/plugin-phpunit-tw-0.16or-tw-0.18
- dev-dependabot/composer/psalm/plugin-symfony-tw-3.0or-tw-4.0
This package is auto-updated.
Last update: 2024-11-28 21:42:26 UTC
README
A plugin for creating all kinds of feeds to any given service. Do you want to create product feeds for your Google Merchant center? Then this is the right plugin for you.
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-feed-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 the following to the list of registered plugins/bundles
in the config/bundles.php
file of your project:
<?php return [ // ... League\FlysystemBundle\FlysystemBundle::class => ['all' => true], Setono\SyliusFeedPlugin\SetonoSyliusFeedPlugin::class => ['all' => true], Setono\DoctrineORMBatcherBundle\SetonoDoctrineORMBatcherBundle::class => ['all' => true], // It is important to add plugin before the grid bundle Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true], // ... ];
NOTE that you must instantiate the plugin before the grid bundle, else you will see an exception like
You have requested a non-existent parameter "setono_sylius_feed.model.feed.class".
Step 3: Import routing
# config/routes/setono_sylius_feed.yaml setono_sylius_feed: resource: "@SetonoSyliusFeedPlugin/Resources/config/routing.yaml"
If you don't use localized URLs, use this routing file instead: @SetonoSyliusFeedPlugin/Resources/config/routing_non_localized.yaml
Step 4: Configure plugin
# config/packages/setono_sylius_feed.yaml imports: - { resource: "@SetonoSyliusFeedPlugin/Resources/config/app/config.yaml" }
Step 5: Update database schema
Use Doctrine migrations to create a migration file and update the database.
$ bin/console doctrine:migrations:diff $ bin/console doctrine:migrations:migrate
Step 6: Using asynchronous transport (optional, but recommended)
All commands in this plugin will extend the CommandInterface. Therefore you can route all commands easily by adding this to your Messenger config:
# config/packages/messenger.yaml framework: messenger: routing: # Route all command messages to the async transport # This presumes that you have already set up an 'async' transport # See docs on how to setup a transport like that: https://symfony.com/doc/current/messenger.html#transports-async-queued-messages 'Setono\SyliusFeedPlugin\Message\Command\CommandInterface': async
Usage
After setup you want to create a feed. Go to /admin/feeds/new
and create a new feed. Remember to enable it and select
one or more channels.
After that go to your console and run this command:
$ php bin/console setono:sylius-feed:process
If you haven't changed any configuration, there should be a feed with your products inside the /var/storage/setono_sylius_feed/feed
directory.