Hi!
I have an e-commerce web shop. If a registered user/logged in user add products to the cart, i will insert the items to the shopping cart mysql table. Everything is fine.
But, if an anonymous user put items to the cart, which is the best solution to save the temporary shopping cart?
Cookies, Session or mySql Temporary table?
my idea: i save a temp table in mysql, userID is session.ID.
If user will not continue shopping, and datatable is filled already; I invoke a script at session.timeout. This script deletes all items from the database table WHERE userID=session.ID (=anonymous)
Good idea or bad idea? Other suggestions? Cookies are more smart way?
thanks in advance!
Mike