- Create notes on order details
- Send personalized email to the addressee of the order
-
Run
$ composer require mangoweb-sylius/sylius-order-comments-plugin
. -
Add plugin classes to your
config/bundles.php
:return [ ... MangoSylius\OrderCommentsPlugin\MangoSyliusOrderCommentsPlugin::class => ['all' => true], ];
-
Add resource to
config/packages/_sylius.yaml
imports: ... - { resource: "@MangoSyliusOrderCommentsPlugin/Resources/config/config.yml" }
-
Add routing to
config/_routes.yaml
mango_sylius_order_comments_plugin: resource: "@MangoSyliusOrderCommentsPlugin/Resources/config/routing.yml" prefix: /admin
-
Override the template in
@SyliusAdminBundle/Order/Show/_notes.html.twig
... {{ include('@MangoSyliusOrderCommentsPlugin/Admin/_order.html.twig') }}
-
Create and run doctrine database migrations.
For the guide how to use your own entity see Sylius docs - Customizing Models
- 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.
- Create symlink from .env.dist to .env or create your own .env file
- Develop your plugin in
/src
- See
bin/
for useful commands
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
This library is under the MIT license.