Forum Moderators: buckworks
If the cart relies on cookies to process cart data then you probably want to verify that cookies are set when a user first attempts to add an item to the cart.
I have been trying to second guess possible situations, i have given the user a cookie with sessionid, the database has a different unque id based on the sessionid, so if the session doesnt = session then that ends the ticket, am i going along the right lines or is using database so not the right way to go?
I see where you're going with it, though. I would probably store the cart information in a session until the visitor confirms that they're going to place the order.
Throwing things in a db right away is going to create A LOT of useless overhead and data bloat from cart-abandonment. It's also not necessary to use server resources to store something that you may never use again (if the visitor abandons to cart).
global.asa and session objects
If this is an asp based session, note that asp uses cookies to store session variables, so users can block them!
I would consider using a single variable to recognise the customer, store this in a cookie or if this is not possible pass it by URL.
Everything else I would put in the DB, along with a variable for order status. 1 - order started, 2 - checked out, 3 - order processed etc. A script run daily could delete all status = 1