Jump to content

Design for product options


mo

Recommended Posts

I am currently rewriting my shopping cart application using codeigniter.

 

My current cart has one cart table that holds product and options(sub items/attributes). The options data is stored in the cart table in one field as a string with each option separated by commas. For example, say I have a shirt with many add-on options, my cart record for this shirt would look like the following.

 

Data: Blue short sleeve shirt product ID ABC123, size large with added embroidery(E01), and stain fighter(SF1)

 

DB Table structure

--------------------------------------------------------------------------

cart_session_id | cart_id | prod_id | price  | size | options

-------------------------------------------------------------------------

dsjkdjbfdjbf120 | 00001 | ABC123 | 15.00 | L      | E01,SF1

 

_______________________________________________

 

 

Is this a good design or should I build a separate table for the cart's product options?

 

Thanks in advance...

 

Link to comment
https://forums.phpfreaks.com/topic/184115-design-for-product-options/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.