Replies: 1 comment
-
It's a bit hacky, but for now this is how I solved it: This method seems to work for now without messing with shield's source code. Not sure if there's a cleaner way at this point. |
Beta Was this translation helpful? Give feedback.
-
It's very common for ecommerce sites to have guest checkout option.
One way to solve this, is to silently sign up the user upon checkout, with an inactive flag, for example (is_registered = false), this way we can tie all the orders that have been made under the given email to that user, without requiring them to sign up, and when they decide to actually do the sign up, we would check if an unregistered user under this email already exists or no. If it does, then we do everything the same way, except we don't create a new user, but change the is_registered flag to true. This way when the user signs up, all orders made under that email address will be accessible
Now when I'm trying to do this in shield, I run into a problem, since shield tries to create the user every time, and there's no way for me to overwrite this part.
What would be the best approach to implement this logic?
Beta Was this translation helpful? Give feedback.
All reactions