Re: Suggestions on storing shopping cart info
- From: "Cirene" <cirene@xxxxxxxxxxx>
- Date: Sun, 17 Aug 2008 23:54:24 -0400
Would using a generic list (of these objects) be the best way to handle this
in your opinion? Store that to a session var?
"Mark Rae [MVP]" <mark@xxxxxxxxxxxxxxxxx> wrote in message
news:%23AbW$pDAJHA.1180@xxxxxxxxxxxxxxxxxxxxxxx
"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: Mark Rae [MVP]
- Re: Suggestions on storing shopping cart info
- References:
- Suggestions on storing shopping cart info
- From: Cirene
- Re: Suggestions on storing shopping cart info
- From: Mark Rae [MVP]
- Suggestions on storing shopping cart info
- Prev by Date: Re: C# Library to Combine and Minify CSS and Javascript files
- Next by Date: EN-US, (English United States) and other values needed
- Previous by thread: Re: Suggestions on storing shopping cart info
- Next by thread: Re: Suggestions on storing shopping cart info
- Index(es):
Relevant Pages
|