I want to create an e-commerce project online.. so I have this issue :
if the user is not logged in , then the selected products will be automatically added to a default cart .. under the name of guest001, guest002 etc... where guest is a defaul user..
if the user signup , then the system will automatically check in his cart default data.. to add it to his new account
when the user then wants to add new products to cart, they will be added directly to his cart.
My questions are :
What's better, using cookies to store the data in the user's machine, so it will be used by the system once the user creates his account?? or using a server side variables?? What's better? creating a default client (guest) in the database once the unkown user adds something to his cart, or just create a cookie with stored data without need to create a guest user??
and thank you in advance.