Skip to content

3BRS/sylius-order-comments-plugin

 
 

Repository files navigation

Order Comments Plugin

Features

  • Create notes on order details
  • Send personalized email to the addressee of the order

Installation

  1. Run $ composer require mangoweb-sylius/sylius-order-comments-plugin.

  2. Add plugin classes to your config/bundles.php:

    return [
       ...
       MangoSylius\OrderCommentsPlugin\MangoSyliusOrderCommentsPlugin::class => ['all' => true],
    ];
  3. Add resource to config/packages/_sylius.yaml

    imports:
         ...
         - { resource: "@MangoSyliusOrderCommentsPlugin/Resources/config/config.yml" }
  4. Add routing to config/_routes.yaml

    mango_sylius_order_comments_plugin:
      resource: "@MangoSyliusOrderCommentsPlugin/Resources/config/routing.yml"
      prefix: /admin
  5. Override the template in @SyliusAdminBundle/Order/Show/_notes.html.twig

    ...
     {{ include('@MangoSyliusOrderCommentsPlugin/Admin/_order.html.twig') }}
  6. Create and run doctrine database migrations.

For the guide how to use your own entity see Sylius docs - Customizing Models

Usage

  • Comment can be written from the order detail.
  • If I check the "Send to customer" checkbox, it will send an email to the customer's email.

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.

$ composer install
$ bin/console doctrine:schema:create -e test
$ bin/behat.sh
$ bin/phpstan.sh
$ bin/ecs.sh

License

This library is under the MIT license.

Credits

Developed by 3BRS
Forked from manGoweb.

About

Add private or public notes to the plugin.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 76.3%
  • JavaScript 7.4%
  • Twig 5.7%
  • Gherkin 5.6%
  • Shell 5.0%