Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.