mo Posted December 5, 2009 Share Posted December 5, 2009 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... Quote Link to comment https://forums.phpfreaks.com/topic/184115-design-for-product-options/ Share on other sites More sharing options...
mo Posted December 10, 2009 Author Share Posted December 10, 2009 solved....forget it! Quote Link to comment https://forums.phpfreaks.com/topic/184115-design-for-product-options/#findComment-975106 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.