Hi,
I have recently been creating myself a shoping cart just to get myself to grips with ASP.NET code. Everything was going well untill i came accross an area that has my mind confused. Basically what i have is a DataView containing the following: Name, Description, Brand Gender, Quantity (this is the quantity that the user has chosen.), Date Added, Price, Product Stock (this is the amount of stock that the company has of this ietm). All of this data is being pulled from a Stored Proc.
I have checks to make sure that the user does not try to add more quantity than the stock level and this all works.
The area i am having an issue with is the confirm button, one i click the button i want all of the information in the cart (currently held in the Cart table) to be transferred to the Orders Table. Transferring the table is not a problem to me however before i do this i would like to check that the item quantity for each item in the dataview is less than or equal to the same item's stock in the Products Table. I have already checked this within the dataview if the user wants to add or delete item quantity from the Cart but how would i check every row of the cart for this as a cart can have multiple answers.
I appreciate that this can sound very confusing and if there is any more information you would like please ask.
Thanks
Boldonglen
Loading
SenthilkumarPosted Mar 1, 2012, 4:34 AM
http://forums.asp.net/t/1371689.aspx/1
Glen RobsonPosted Feb 27, 2012, 10:34 AM
Do you have any links or documents that would assist me in implementing this?
A tutorial on how to create a Shopping cart using the above approach would be great.
Or even if you could point me in the right direction?
Thanks
Boldonglen
SenthilkumarPosted Feb 27, 2012, 10:26 AM
I would suggest you to implement some of the new model which gives the better scalability and performance.
In a busy shopping portal, you can't play with the data you have... concurrent access will give more issues...There may be 3 products and 10 persons try to shopping that product then you need extra round trip to the server...
Please go through the sqlscachedependency concept and try to implement it...