Re: Suggestions on storing shopping cart info
- From: "Mark Rae [MVP]" <mark@xxxxxxxxxxxxxxxxx>
- Date: Sun, 17 Aug 2008 08:25:52 +0100
"Cirene" <cirene@xxxxxxxxxxx> wrote in message news:%23lYTVGCAJHA.4992@xxxxxxxxxxxxxxxxxxxxxxx
As the shopper adds things to the cart and navigates throught the site to shop more, should I store this info in a session var?
That would work. Alternatively, if you want the customer to be able to save the cart and come back to it later, you should save it to a database...
Should I create another class for cart and store an array of product_info to keep track of what's in the cart, etc...?
That's what I do, though I tend to use a generic e.g. Dictionary<int, int> to store the ID of the purchased product along with the number of items purchased...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
.
- Follow-Ups:
- Re: Suggestions on storing shopping cart info
- From: Cirene
- Re: Suggestions on storing shopping cart info
- From: Cirene
- Re: Suggestions on storing shopping cart info
- References:
- Suggestions on storing shopping cart info
- From: Cirene
- Suggestions on storing shopping cart info
- Prev by Date: Re: Preserving Textbox.Text in a foreach loop
- Next by Date: Re: JavaScript to Change Table Color
- Previous by thread: Suggestions on storing shopping cart info
- Next by thread: Re: Suggestions on storing shopping cart info
- Index(es):
Relevant Pages
|