Re: Suggestions on storing shopping cart info

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"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

.



Relevant Pages

  • Re: RMAN CONVERT DATABASE
    ... Simultaneously Jane places the same item in her online cart. ... Items available on the online store should come from a distinct depot. ... and ship directly to the happy online customer. ...
    (comp.databases.oracle.server)
  • Re: Victim of a Theft
    ... I left the supermarket and pushed my cart after paying for my groceries ... sidewalk where my trike was parked and chained 20 feet away. ... the trike and went back for another bag containing the items listed ... The store person talked to the manager who said they would replace the ...
    (soc.retirement)
  • Re: Thinking about a second--1st is 8 months old--any regrets?
    ... It's hard to imagine how I'd keep one child ... How on earth do you do anything (like travel or go to the store) ... park as near a cart return as you can. ... Bizby ...
    (misc.kids)
  • Re: How to make a 3 year old understand
    ... She was in the back of the cart then when she did ... look at hubby and the next thing we knew she was on the floor. ... once we get in the store and in there a few mins she will run away from me. ... very hard for me to take care of both of my kids some days. ...
    (misc.kids)
  • Re: Its all in how you look at it.
    ... groceries to get and use one of the push arounds, ... Without the corresponding real energy to back it up. ... Then looked at the store and my list. ... So I took the cart. ...
    (alt.support.arthritis)