Although below sounds like it should be done - I sort of cheated on a 
few of my clients sites. They wanted things like this added differently 
to how they were doing it.
So I simply added a Color field in items - have the user enter a comma 
list -
small,medium.large
and parse that to a drop down.

If you have the time however - I would follow the route below for 
scalability. Above works well enough on 2 large sites - just an idea.
jay

Dowdell, Jason G wrote:

>Actually, I just went through the exact same scenario.
>Basically you'll need to create an item table, a attribute_group table,
>an attribute table, and an item_attribute_lookup table.
>Store your basic attribute types in the attribute_group table...
>size, color, weight.  Then in the attribute table you'll
>have a fk to the attribute_group table and store the value
>of the attribute here (pink, blue, green).  Then the item_attribute_lookup
>stores your attribute id (fk from attribute table) and the
>ItemID (fk from item table) as well as any other information you 
>need for each individual item.  You can store price, inventory or
>anything else here.  I'd also recommend putting an Active_Ind
>field on the item_attribute_lookup table as well.
>
>Hope this helps,
>Jason
>
>-----Original Message-----
>From: Chris Alvarado [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, November 26, 2002 11:24 AM
>To: CF-Talk
>Subject: E-Commerce, and Variations
>
>
>Hello all,
>
>Wanted to pick your brains on some DB related stuff.
>
>Currently working on an E-Commerce site and deal with product variations
>(size / color - which relates to price) and was curious to know if
>anyone has any suggestions on table structure to best handle this, or
>know of any good sites with reference.
>
>Logically what takes place is a certain size + color combination
>constitutes the "configuration" of the product they are purchasing, as
>well as determines the price.
>
>Just trying to get the relationship to make sense.
>
>Thanks all,
>
>-chris.alvarado
>[ application developer ]
>4 Guys Interactive, Inc.
>http://www.4guys.com 
>
>"We create websites that make you a hero."
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to