Hello,
I'm looking for the best way to design a shopping cart. I'm at a crossroads with how to handle a product that has multiple options being color and size. The main issue being inventory management for the colors and sizes.
Currently on admin panel:
textfield for color textfield for quantity
User seperates colors by comma along with quantity so color & quantity match when I explode/implode them into arrays, thus allowing me to manage the quantity whenever something is purchased by their keys after doing an array search for the color.
Right now I just have one table holding upc/name/color/quanity/price etc...
Should I be using some type of foreign key and having tables for color/quantity on their own?
This is more of a design question and not a show me exactly how to do it question as I'm just trying to learn the most optimum way to manage a database.
Thanks!