I have shop struct like
1: Shop has many Categories
2: Categories have 1 to many Sizes and Products
3: Each product belongs to exactly one Category
4: As Sizes belongs to Categories so each product belonging to a category will have same sizes.
Now my problem is in Product add form.
I have form the contains product's input fields and a selectbox to select the Category.
As soon as I select a category, an Ajax request will be created, which return sizes as inputbox assigned to the selected category. The input boxes will be used to enter the price
for each size of the product. (As the input fields will be generated in Ajax, how may i use the form helper?)
Now I want that on clicking the save button, the product information should be stored in product table, and the prices should be saved in
Product_Prices table which contains product_id, size_id, price columns.
How should i name my inputboxs? and how should i call the save method so that the informations are properly saved?