Hello,
I've built a decent shopping cart for a client, but I have a general question regarding order management. What is the BEST way to store the order information?
This is the problem.
The cart has a field for colors, each shirt lets say, is available in different colors. For this reason, I have a color table with colorID and colorName. Then a linker table that links the products to the colors and so forth.
However, when orders are placed, I store the details of the order as colorID and productID... what happens if that product or color is later deleted from the database... I lose the reference in the order details (say, if someone wants to check their order history).
Example:
ORDER ID: 1001
Product: rock'n'roll t-shirt in blue
$9.99
The t-shirt is no longer available in blue or for sale...
So, do I have to add these order details as STATIC pieces of information in the orders table? IF so, what is the best way?
Any theories would be appreciated.