w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Where to store orders for non-registered users on e-commerce site?

The main difference between registered and non-registered users is usually that the former can log in and see their orders whereas the latter can't.

So you can store them just alike, only that you need a pseudo name and no password for non-registered users. That is to say: 1. make the password nullable in your table, 2. create a UUID for the user name whenever someone orders without registering.

(Maybe you will have to make more fields nullable that are obligatory for registered users but not for non-registered ones.)

EDIT: Of course you can also keep the password not nullable and generate some password along with the user name that will never be used.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.