You might want a structure containing an array of structures. The outer
structure would be useful for any information that you need that is order
specific (as opposed to item specific). That structure then contains an
array of items in the cart, and each item is represented by a structure
(containing product number, description, price, quantity, etc).

--- Ben



-----Original Message-----
From: Daslweb - Greg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 02, 2000 1:38 PM
To: [EMAIL PROTECTED]
Subject: Re: shopping carts


Use an array because they are dynamic with cold fusion.
For example if you set row 1 through ten with information
and then delete row 8, row 9 becomes row 8 and row 10 becomes row 9
----- Original Message -----
From: "Matthew Walker" <[EMAIL PROTECTED]>
To: "Cf-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, August 02, 2000 7:12 AM
Subject: shopping carts


> What kind of data structure would you recommend storing a shopping cart
as?
>
> I have set one up as a structure Session.Cart which contains a set of
> structures identified by ProductID as the Keys, where each of these
> structures contains the basic info about each product ordered (name,
price,
> quantity). I'm storing more than just the ProductID and Quantity in order
to
> reduce database load. Is this a good way of doing it, or would an array or
a
> list or whatever be better. There must be one best way I should think.
What
> do people consider that to be??
>
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>





----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to