shopping cart... why most of the online shopping website can add item to cart even without logging in? how did they do that in asp.net?
Printable View
shopping cart... why most of the online shopping website can add item to cart even without logging in? how did they do that in asp.net?
Cookies, session IDs?
.
How?Quote:
Quote:
Cookies, session IDs?
Because it in my MSSQL it goes like this; 'Select * From MOrder WHERE CustID=" & cCusID
How about when there is no current user?
Cookies, session IDs? :)
You need to map an order/shopping cart to a session ID (which you can retrieve from the session) and later, when the user decides to check out and log in with his/her credentials, map the session ID to the user ID to complete the check out.
If you are currently mapping the order/shopping cart to a customer ID (which I believe you are), you may have to change that logic.
.
Hello,
For getting more information about this, it might help to look at a complete sample. There are a number of them available here:
http://www.asp.net/web-forms/samples
And I am sure that at least one of them will have a Shopping Cart that has the functionality that you require.
Gary