Ok, so my site is just like "Post Your Order" rather than the usual online payment method since I will be shipping the item first then the cash which is the Cash On Delivery offered by Shipping services here.
I have a users table which have user_id, email, password, first and last name, etc.
an user_order table which have order_id, user_id_fk, order_status, order_placed, address_id_fk
an order_items table which have order_item_id, order_id_fk, product_id, quantity, size_id_fk
address table address_id, user_id_fk, street, city, province, etc
So, if the user is registered it's easy to do this since i would just link their user_id to the user_order table and the address from their address_book
My problem is, how do i do that with guest checkouts? I'm trying to avoid them to be forced to register even though it's easy.
What on my mind right now is to just insert them to the users table too, but with their password as NULL and just make a guest group and put them to that group.
But that may cause a problem, email in my users table must be unique, guest checkouts may happen more than once from the same email soo... now what?
should i just add column to the orders table? another, name, email, address? so it's not tied to the users? that's possible but there's a feature i would like the registered user to have... to track their Order History.
Help please... Thanks :D ;)