3brs/sylius-order-comments-plugin

Order comments plugin for Sylius

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 2

Type:sylius-plugin


README

68747470733a2f2f33627273312e667261312e63646e2e6469676974616c6f6365616e7370616365732e636f6d2f336272732f6c6f676f2f334252532d6c6f676f2d73796c6975732d3230302e706e67

Order Comments Plugin
68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f336272732f73796c6975732d6f726465722d636f6d6d656e74732d706c7567696e2e737667 68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f336272732f73796c6975732d6f726465722d636f6d6d656e74732d706c7567696e2e737667 68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f336272732f73796c6975732d6f726465722d636f6d6d656e74732d706c7567696e2f6d61737465722e737667

Features

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

CreateEmailsAndNotes.png

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.