ASP.NET - add to cart in asp.net? - Asked By Chinnarasu .M on 26-Jun-12 07:47 AM

hi, i use below link to use  for add to cart but with out using table how to use please help me.......give some examples.....

http://www.pothys.com/products/Silk%20Sarees/Samudrika%20Pattu.html
Lalit M replied to Chinnarasu .M on 26-Jun-12 07:49 AM
For Shopping cart in your asp.net site first built  following methods:

-> Create a Database Table Called ShoppingCart
-> Store a Your ASP.NET session as Foreign Key
-> Either Add a ProductID per row or store a list of ProductIDs per row. This usually depends on if you have meta data you need to store about each product, such as quantity or size. The more meta data, the easier it is to manage if you store one product per row.

show this good article how to add shopping card in your asp.net site step by step good guide you.
----------
http://net.tutsplus.com/tutorials/other/build-a-shopping-cart-in-aspnet/
http://csharpdotnetfreak.blogspot.com/2009/05/aspnet-creating-shopping-cart-example.html
dipa ahuja replied to Chinnarasu .M on 26-Jun-12 02:16 PM
I can give you the basin info about the shopping cart project


1. Decide how many tables you will required
2. Decide the relationships between those tables
3. Choose proper template for your website
4. Choose no. of WebPages you will need ,and navigation from one page to another..

Now the real cart process:

For Shopping Cart you have two options, Either you can use the shopping card which is available with readymade functionality or create your own cart process:
Now what you have to do is:
Put a page like items, in items page put all the categories of items, for ex if you are making of electronic shop then product categories will be Television, dvd player, telephones, Home theatres etc..

Now use will select an item - > he will be redirected to the ItemDescription page where user will get more info about that particular item
Suppose you are displaying your item in the page "item.aspx"
now put one button "Add To Cart" iand when user clicks on it.. add the selected item into tmp table with the fields like itemname, price,userId/userName etc...
now suppose you have page cart.aspx.. here you can take gridview and bind it with the "tmp" table with the items that user has selected .

so the query of gridview will be "Select itemName,Price from tmp where username=<currentlyLoginUSer>"..

start this way.. you will get more idea when you code this....