I am building a shopping cart in CakePHP and currently have the following relationships:
Product
HABTM (HasAndBelongsToMany)Options
Cart
HABTMProducts
Pretty standard? I'm just not sure what to do when a user selects some options for the product and saves it to the cart. Do I add a new model called CollectionsProductOptions
?
What's the best way to store this kind of data? Should I just serialize an array of selected options and save to the carts_products
table?