One Step checkout

Hey there,
I’ve been following https://docs.sylius.com/en/1.3/cookbook/shop/checkout.html and https://docs.sylius.com/en/1.3/customization/state_machine.html?highlight=state to modify the state machine to create a one-step checkout.
I’ve altered the transitions down to three: cart, onestep and completed, where onestep is a new one.

Now the problem is, I can’t find the route that the checkout button in the cart uses, as it’s still sending the user to /checkout/address. I’ve grepped for “address” but don’t seem to be finding the route config. Does anyone know where I should be looking?

I’ve left this post with a generic title as I intend to document my process and possibly expand the discussion without making successive issues.

Thanks,

Alex

2 Likes

After hours of looking, I find it minutes after posting here :joy:
For those playing along: src/Sylius/Bundle/ShopBundle/Resources/config/routing/checkout.yml sylius_shop_checkout_start route :slight_smile:

Hello Alex,
Tell me please did you solve this problem?
Did you use state machine or just create OrderService and write all business login for some method?
Thanks
Vladimir

Hey Vladimir,
We did end up using the state machine, but looking back, I think we should have just done it bespoke; we may refactor our solution in the future.

Thank you, but I try to resolve OrderService without state machine

Hi, @alexrowesoap, did you manage to do one checkout page?