Working on a E-commerce solution where I need to handle checkout based on anonymous customer and as of now I am not able to think properly how best this can be implemented.
Our ShoppingCart is being saved in database and and every update/ edit in ShoppingCart is being updated in database.
Now I need to take care about creating an anonymous customer and than assign this cart to that customer so that add to cart and well checkout can be associated with this customer.
Can anyone suggest me what can be the right way to go for this?
- Should I create one anonymous user in database and use it everytime a request for new customer (anonymous ) is being created.
- Place that user in current user session.
- Perform any operation on cart with respect to the current session