Hi
I have developed small CMS system for the websites that I create for customers. However, from time to time, I have difficulties with my products table,and I need help to solve it.
To display the customer products, I have the following tables structure:
products_categories
products_subcategories
products
products_categories has following fileds:
catid
description
categoryphoto
sortorder
visible
products_subcategories has following fileds:
subcatid
catid
description
subcategoryphoto
sortorder
visible
and products table has the following fileds:
productid
catid
subcatid
productname
price
description
productphoto
productpdf
isnewproduct
showonhomepage
productvideo
sortorder
visible
Now, if my customer has sub categories, I use this structure and I am fine, more or less. When the customer has no subcategories, I just do not place the table products_subcategories, and I just remove the subcatid from the products table, and I am more or less fine again.
My problem arise when customer told me, you know, I have subcategories for some products, but I do not have subcategories for other products. Or, when customer tell me, you know, in category books for example I have 3 levels of subcategories, but in the category DVD, i have no subcategories at all. Same problem arrise if he ask me: Can i have 5 levels of subcategories everywhere?
Can anyone propose me a products table design which will suit my customer needs?
Regards, Zoreli