Skip to content

TELLO0815/SyliusFeedPlugin

 
 

Repository files navigation

Sylius Feed Plugin

Latest Version on Packagist Software License Build Status Quality Score

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 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.

Step 2: Enable the plugin

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(),
            // ...
        ]);
    }
    
    // ...
}

Step 3: Configure the plugin

# 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"

Step 4: Update your database schema

$ php bin/console doctrine:schema:update --force

or use Doctrine Migrations.

Usage

  1. Go to /admin/feeds/ and create a new feed.
  2. Run this command to generate your feed(s): php bin/console setono:feed:generate
  3. Now you can download your newly generated feed here: /en_US/feed/test assuming that your locale is en_US and that the slug of the feed is test

TODO

  • 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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 92.4%
  • JavaScript 7.6%