-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate "User" and "Customer" #180
Comments
It might be good to see how vespolina does it also. |
As far as I could see vespolina doesn't provide something like "customer" or "user" at all. The most identity-related data seems to be "address". Must say: Seems valid too ^^ |
+1 for this separation once it allows easily implementation of guest checkout and lazy registrations. |
I like this. If anyone wants to work on this separation, we should start a discussion about implementation first. Thanks @kingcrunch for raising this idea! 👍 |
@pjedrzejewski I can take it,. To do list :
Is it OK for you ? |
@jjanvier I've some doubts if this separation sounds good from a modeling perspective. In the real life, the user and customer are the same. Furthermore, for the guest checkout case, we can have consumers without users. It may be that naming as |
@marcospassos I think we're talking here about "Customer" not "Consumer". :) |
Just a typo (fixed), but I keep my considerations. Does it make sense to have two entities, one called User and another Customer? IMHO an user may be a customer but never has one. |
Just to be cleared, in my mind :
I agree that the names of these entities do not make sense. We could find better. And yes in the real life, a user is a customer (or a customer is a user). But about the separation of these entities @pjedrzejewski @marcospassos, I thought the goal was to decouple profile data from basic user data to be able to use something else that FosUserBundle. Did I misunderstood ? Because marcospassos makes me doubt ^^ |
No, I totally agree with this separation. My point is just about ubiquitous language and cohesion. |
OK. What about ?
|
What do you think about add custom properties to Customer (like product)? The shop administrator could mange them in the backend, it permit to ask more informations to those Customer like birthbay, etc... Useful for businessmen, they could know their customers a little bit more. |
@Arn0d it's beyond the scope of this discussion (...and it can be made independent of this separation ;) |
@marcospassos : ok sorry. |
@pjedrzejewski @marcospassos any opinion about the name of the new entity ? |
Just to point that out: My point in this ticket actually was, that a customer is not necessarily a user. A customer may have a user profile (where For example a user doesn't need a real name, as this is not required to handle the user itself, but the customer needs it. I'd just create a |
@kingcrunch it would be true if the Maybe some VO's like |
@marcospassos If you look at FOSUserBundle
As far as I can see this is how vespolina solved it: The "customer" is represented by his addresses only, but it is not required, that he must be registered. |
@kingcrunch the problem you raise in your last posts is only a "language" problem (at least I think, correct me if I'm wrong :) ) Currently in Sylius, users (or customers, this is exactly the same) has only one mandatory field : email. First name, last name and addresses are not mandatory to order something. Why ? Because there is no relation between the user's addresses and an order. When you create an order, this order has its own related addresses (shipping and billing), not the ones of the user / customer. Personal data of the customer (or profile, or user's data) are just meant to be shortcuts to order. In the future, (when this PR will be done), if a user selects one of his addresses to be shipped, we will in reality clone his address and link it to the order. |
@jjanvier So, is it possible to order something without getting registered as a |
@kingcrunch currently no because guest checkout is not yet implemented. But the separation between "FosUser" basic entity and "registered user" data is a first step to be able to provide this feature IMO. I just wanted to point out that "registered user" data are not linked to the order process, which is very important. A few tickets have already been opened to ask about ordering without being registered. You should ask marcospassos or pjedrzejewski about that, but I don't think this is on top of the list ATM. |
ping @pjedrzejewski @umpirsky for the name of the entity (I'd like to do this first before moving forward on the account section) |
reping @pjedrzejewski @umpirsky |
Updating the configuration reference
Just a suggestion and I want to know, what you think about it: I would prefer a separate
User
(ideally simply based on vanilla FOSUser-entity) andCustomer
-class."Something like"-UML
User
-implementation.User
andCustomer
would make it easier to handle this situation: All in one class would mean, that you have to test, whether or not this account was created intentionally, or only to handle the process.The text was updated successfully, but these errors were encountered: