Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
doc
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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