Skip to content
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

Allow guest checkout for registered users #762

Closed
martijnvdbrug opened this issue Mar 15, 2021 · 4 comments
Closed

Allow guest checkout for registered users #762

martijnvdbrug opened this issue Mar 15, 2021 · 4 comments
Labels
design 📐 This issue deals with high-level design of a feature @vendure/core
Milestone

Comments

@martijnvdbrug
Copy link
Collaborator

Currently, a user that has registered before, is not allowed to place an order when not logged in:

  1. user@test.com registers as customer
  2. user tries to place an order on a different device with email user@test.com
  3. user is not allowed to place order without logging in to its account.

Describe the solution you'd like
It would be nice to have a config option that always allows guest orders.

Describe alternatives you've considered
The only alternative I can think of is having the user login, which doesn't solve the problem of minimizing steps for checkout

Additional context
A best practice to drive conversion for e-commerce is to minimize exit points/ noise during checkout. Forcing a user to log in adds an extra step.

Stolen from Vue Storefront: Google retail UX playbook
page 3 'Conversion' says 'Allow guest checkout' for optimization.

@michaelbromley
Copy link
Member

In general I am all for reducing friction to the checkout.

In this particular scenario we need to think about the following aspects - whether they are important enough to worry about, and if so, how to handle them.

  1. Let's say a new Customer comes along with email address user2@test.com who is not the same person as user@test.com. They accidentally enter their email address as "user@test.com". This order then would get placed against the wrong customer account.
  2. In the same scenario, changes to the Customer details (ie firstName, lastName) overwrite the saved details of any existing Customer account when calling the setCustomerForOrder mutation.
  3. Now let's assume that the guest customer is the same person as the registered account. They enter their address and then we call setOrderShippingAddress with the data they input. However, since they are not logged in, they had to manually enter it and it is slightly different from the address we have on file for the user@test.com account (e.g. punctuation difference). How do we then deal with that? Do we add a new, almost-identical Address entity for that customer?

There might be other minor edge-cases to consider beyond these. What I often see in a typical checkout flow is a screen where you can choose guest checkout, or to login if you are already registered. If such a flow was implemented, then presumably this issue would only arise if the customer forgot they had an existing account and clicked on "checkout as guest". Which I guess could happen quite often given typical user behaviour.

@michaelbromley michaelbromley added @vendure/core design 📐 This issue deals with high-level design of a feature labels Mar 15, 2021
@martijnvdbrug
Copy link
Collaborator Author

martijnvdbrug commented Mar 16, 2021

I'm aware of the complexity of this, but I think guest customers should be separate from registered customers. In the admin you could still find all orders for email X, but it would not affect registered customers addresses. This way, registered customers are never updated by guests.

  • Let's say a new Customer comes along with email address user2@test.com who is not the same person as user@test.com. They accidentally enter their email address as "user@test.com". This order then would get placed against the wrong customer account.

Here we would end up with a registered user@test.com and a guest user@test.com

  • In the same scenario, changes to the Customer details (ie firstName, lastName) overwrite the saved details of any existing Customer account when calling the setCustomerForOrder mutation.

Separating guest from registered would never affect registered customers' addresses. The worst case is that the address of guest user@test.com is overwritten, which is fine.

  • Now let's assume that the guest customer is the same person as the registered account. They enter their address and then we call setOrderShippingAddress with the data they input. However, since they are not logged in, they had to manually enter it and it is slightly different from the address we have on file for the user@test.com account (e.g. punctuation difference). How do we then deal with that? Do we add a new, almost-identical Address entity for that customer?

This would also only affect the guest customer.

This will cause a lot of breaking changes I guess, one of them being emailAddress not being the unique identifier for customers anymore.

Maybe this is something for a 2.0? Or a plugin which allows updating registered customers as guest.

@michaelbromley
Copy link
Member

This way, registered customers are never updated by guests.

The trade-off here is that if a customer makes one or more guest orders, and then later registers for an account, we can already have all their previous orders registered against that same Customer entity. If we logically split guest/registered customers, we might lose this property.

Yes I think this would be a breaking change that should wait for v2.0. This thread can serve to pool implementation ideas in the mean time.

@martijnvdbrug
Copy link
Collaborator Author

Closing this issue in favor of #911

@michaelbromley michaelbromley moved this from 📅 Planned to ✅ Done in Vendure OS Roadmap Mar 15, 2023
@michaelbromley michaelbromley moved this from ✅ Done to 🔖 Ready in Vendure OS Roadmap Mar 16, 2023
@michaelbromley michaelbromley moved this from 🔖 Ready to 🏗 In progress in Vendure OS Roadmap Mar 16, 2023
michaelbromley added a commit that referenced this issue Mar 16, 2023
@michaelbromley michaelbromley moved this from 🏗 In progress to 🔖 Ready in Vendure OS Roadmap Mar 16, 2023
@michaelbromley michaelbromley moved this from 🔖 Ready to ✅ Done in Vendure OS Roadmap Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design 📐 This issue deals with high-level design of a feature @vendure/core
Projects
Archived in project
Development

No branches or pull requests

2 participants