[Core] Nullable customer on order#9578
Conversation
lchrusciel
commented
Jul 10, 2018
| Q | A |
|---|---|
| Branch? | 1.1 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | |
| Related tickets | fixes #9577 |
| License | MIT |
|
Could you target |
|
It was meant for 1.1. Sorry 🙈 |
|
Thank you, Łukasz! 🥇 |
|
The intention is to allow attaching orders to non-customer resources, right? |
|
It was a BC breaking change against 1.0, so we had to revert it. By default, it is not possible to assign a null as a customer during checkout in the default checkout process. However, you can customise it and then it is possible. |
|
Yes, I understand that. But what I'm curious about is whether attaching orders to something other than a customer or a user (say, a company) is something you've thought about and whether that's designed for. |
|
Not that I'm aware. Default Sylius implementation will be broken in that case, because we need an email to send a confirmation mail. But with a few customisations, it is possible (but I have never tried it). On the other hand, there is always some "Customer", even if it is not a person. Unless it is some POS, then we would need to customise checkout flow for this use-case. I have noticed this bc break because on some custom development project we were assigning a customer from service which could return an instance of it or null. Right now, I'm allowed to do it without if statement |