3brs/sylius-sorting-plugin

Sorting plugin for Sylius

Installs: 2 592

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 5

Open Issues: 0

Type:sylius-plugin

v2.0.0 2025-09-16 09:05 UTC

README

Sorting Plugin

Features

  • Sort products in taxons by simple drag and drop
    • Well-arranged overview of all products in the taxon
    • Disabled products greyed out
    • Direct links into product details
    • Optionally hidden taxon tree and product images to get even more space

Installation

  1. Run composer require 3brs/sylius-sorting-plugin.

  2. Register plugin to your config/bundles.php:

    return [
        ...
        ThreeBRS\SortingPlugin\ThreeBRSSyliusSortingPlugin::class => ['all' => true],
    ];
  3. Import plugin configuration in config/packages/_sylius.yaml:

    imports:
        - { resource: "@ThreeBRSSyliusSortingPlugin/config/config.yaml" }
  4. Import routing configuration in config/routes.yaml:

    threebrs_sorting:
        resource: "@ThreeBRSSyliusSortingPlugin/config/routing.yaml"
        prefix: '%sylius_admin.path_name%'
  5. Import plugin JS in webpack.config.js

    Encore
       .addEntry('threebrs-sorting-admin', path.resolve(__dirname, 'vendor/3brs/sylius-sorting-plugin/assets/admin/js/sorting-plugin.js'))
  6. Require JavaScript library sortablejs:

    yarn add sortablejs:^1.15.6
  7. Rebuild assets:

    yarn install
    yarn build

Usage

  • Log into admin panel
  • Click on Sorting products in the Catalog section in main menu
  • Select taxon
  • Drag and drop cards
  • Click Save positions button in the top right corner

Development

Usage

  • Create symlink from .env.dist to .env or create your own .env file
  • Develop your plugin in /src
  • See bin/ for useful commands

Testing

After your changes you must ensure that the tests are still passing.

make ci

License

This library is under the MIT license.

Credits

Developed by 3BRS
Forked from manGoweb.