ASP.NET - add to cart in new page from product list in

Asked By mani on 25-Jun-12 03:13 AM
hi.. anybody help me to do add to cart in new page called cartview.aspx like in this website..
S K replied to mani on 25-Jun-12 03:21 AM
What do you mean by add to cart in new page? Bascially when develop shopping cart and you want to add any product into cart or wishlist you just add that item in datatable and stored that data table in session. 
After that you can display that datatable's item on cart view page or any where you want.
Jitendra Faye replied to mani on 25-Jun-12 03:26 AM
For this maintain session variable, when you are selecting any item add it to session variable. and after redirecting to second page get selected items from session variable.
dipa ahuja replied to mani on 25-Jun-12 08:02 AM
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....
mani replied to dipa ahuja on 25-Jun-12 09:13 AM
hi..thanks for u r reply..but my query is how to do add to cart with out login in my webpage..
so user
dipa ahuja replied to mani on 25-Jun-12 09:34 AM
Thats depends on the logic you develop.

Card is not a single process, you have to make the logic how the user goes from home to item to cart. and how he/she add items to card. Also till which page you want to allow to do process without the user is loggged in