setono / sylius-order-edit-plugin
Setono example plugin for Sylius.
Fund package maintenance!
Setono
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 2
Type:sylius-plugin
Requires
- php: >=8.1
- doctrine/orm: ^2.0 || ^3.0
- doctrine/persistence: ^2.0 || ^3.0
- sylius/core: ^1.0
- sylius/core-bundle: ^1.0
- sylius/grid-bundle: ^1.0
- sylius/order: ^1.0
- sylius/order-bundle: ^1.0
- sylius/resource-bundle: ^1.6
- symfony/config: ^5.4 || ^6.4 || ^7.0
- symfony/dependency-injection: ^5.4 || ^6.4 || ^7.0
- symfony/doctrine-bridge: ^5.4 || ^6.3 || ^7.0
- symfony/event-dispatcher: ^5.4 || ^6.4 || ^7.0
- symfony/form: ^5.4 || ^6.4 || ^7.0
- symfony/http-foundation: ^5.4 || ^6.4 || ^7.0
- symfony/http-kernel: ^5.4 || ^6.4 || ^7.0
- symfony/options-resolver: ^5.4 || ^6.4 || ^7.0
- symfony/routing: ^5.4 || ^6.4 || ^7.0
- webmozart/assert: ^1.11
Requires (Dev)
- api-platform/core: ^2.7.16
- babdev/pagerfanta-bundle: ^3.8
- behat/behat: ^3.14
- doctrine/doctrine-bundle: ^2.11
- infection/infection: ^0.27.10
- jms/serializer-bundle: ^4.2
- lexik/jwt-authentication-bundle: ^2.17
- matthiasnoback/symfony-dependency-injection-test: ^4.3 || ^5.1
- phpspec/prophecy-phpunit: ^2.2
- phpunit/phpunit: ^9.6.17
- psalm/plugin-phpunit: ^0.18.4
- setono/code-quality-pack: ^2.7
- sylius/sylius: ~1.12.13
- symfony/browser-kit: ^5.4 || ^6.4 || ^7.0
- symfony/debug-bundle: ^5.4 || ^6.4 || ^7.0
- symfony/dotenv: ^5.4 || ^6.4 || ^7.0
- symfony/intl: ^5.4 || ^6.4 || ^7.0
- symfony/property-info: ^5.4 || ^6.4 || ^7.0
- symfony/serializer: ^5.4 || ^6.4 || ^7.0
- symfony/web-profiler-bundle: ^5.4 || ^6.4 || ^7.0
- symfony/webpack-encore-bundle: ^1.17.2
- symfony/workflow: ^6.4
- willdurand/negotiation: ^3.1
Conflicts
- doctrine/annotations: <1.13.2
- doctrine/data-fixtures: <1.5.1
This package is auto-updated.
Last update: 2024-06-18 11:04:32 UTC
README
Sylius Order Edit Plugin
Edit orders inside your admin interface.
Important (read before using)
Editing orders is a big thing and can have a lot of implications. Before you use this plugin, there are some things you should check and/or be aware of:
-
State machine: Right now this plugin only works if you use the Winzou State Machine as your Sylius state machine. You can check this by running
php bin/console debug:container sylius.resource_controller.state_machine
. Theclass
should beSylius\Bundle\ResourceBundle\Controller\StateMachine
. -
Flow: The flow of editing an order looks like this:
- You press edit in the order overview.
- You edit the order and click
Save changes
. - The order is now transitioned to the
cart
state. - The
sylius.order_processing.order_processor
service is run. - The order is transitioned to the
new
state. - The order is saved
You can see this flow implemented in the
\Setono\SyliusOrderEditPlugin\Controller\ResourceUpdateHandler
class.
What does this mean for you?
First of all, check your state machine implementation. If you don't use the Winzou State Machine, you can't use this plugin.
Secondly, when transitioning the order from new
to cart
and back again, the callbacks on the state machine are triggered.
This plugin handles the callbacks added by Sylius, but if you've made any custom callbacks, you need to make sure they are compatible with this flow.
Install
TODO
Usage
TODO