Skip to content

Instantly share code, notes, and snippets.

@leflings
Created July 7, 2021 09:16
Show Gist options
  • Save leflings/a9cdceaad80dd119ee5576b057aef2a3 to your computer and use it in GitHub Desktop.
Save leflings/a9cdceaad80dd119ee5576b057aef2a3 to your computer and use it in GitHub Desktop.
v.1.8 post modification
>>> bin/console debug:config winzou_state_machine sylius_order_checkout
Current configuration for "winzou_state_machine.sylius_order_checkout"
======================================================================
class: App\Entity\Order\Order
property_path: checkoutState
graph: sylius_order_checkout
state_machine_class: Sylius\Component\Resource\StateMachine\StateMachine
states:
cart: null
addressed: null
shipping_selected: null
shipping_skipped: null
payment_skipped: null
payment_selected: null
completed: null
transitions:
address:
from:
- cart
- addressed
- shipping_selected
- shipping_skipped
to: addressed
skip_shipping:
from:
- addressed
to: shipping_skipped
select_shipping:
from:
- addressed
- shipping_selected
- payment_selected
- payment_skipped
to: shipping_selected
skip_payment:
from:
- shipping_selected
- shipping_skipped
to: payment_skipped
select_payment:
from:
- payment_selected
- shipping_skipped
- shipping_selected
to: payment_selected
complete:
from:
- payment_selected
- payment_skipped
to: completed
callbacks:
after:
sylius_process_cart:
'on':
- select_shipping
- address
- select_payment
- skip_shipping
- skip_payment
do:
- '@sylius.order_processing.order_processor'
- process
args:
- object
disabled: false
priority: 0
sylius_create_order:
'on':
- complete
do:
- '@sm.callback.cascade_transition'
- apply
args:
- object
- event
- '''create'''
- '''sylius_order'''
disabled: false
priority: 0
sylius_save_checkout_completion_date:
'on':
- complete
do:
- object
- completeCheckout
args:
- object
disabled: false
priority: 0
sylius_skip_shipping:
'on':
- address
do:
- '@sylius.state_resolver.order_checkout'
- resolve
args:
- object
priority: 1
disabled: false
sylius_skip_payment:
'on':
- select_shipping
do:
- '@sylius.state_resolver.order_checkout'
- resolve
args:
- object
priority: 1
disabled: false
sylius_control_payment_state:
'on':
- complete
do:
- '@sylius.state_resolver.order_payment'
- resolve
args:
- object
disabled: false
priority: 0
sylius_control_shipping_state:
'on':
- complete
do:
- '@sylius.state_resolver.order_shipping'
- resolve
args:
- object
disabled: false
priority: 0
complete_pay_pal_order:
'on':
- complete
do:
- '@Sylius\PayPalPlugin\Processor\PayPalOrderCompleteProcessor'
- completePayPalOrder
args:
- object
disabled: false
priority: 0
guard: { }
before: { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment