I thought I had things figured out, but then it all fell apart on me when I went to add a dynamic menu. No fault to any of the extensions. Just my misunderstanding of what I should have created in the beginning.
I will simplify my needs here and then add in details if something is missing. I know that part of this could be posted in the CSS Menu Writer forum, but I wanted to update this post as well. And it includes issues of tables, relational tables and JOINS.
Here are my tables as they relate to my current attempts.
#1 "tblProducts" table with ProductID, ProductName, Description, Price, Image, ProductCategoryID columns.
#2 "tblProductCategories" table with ProductCategoryID, ProductCategoryName columns.
#3 "tblSubCategories" table with SubCategoryID, SubCategoryName columns
#4 "rtblSub_Products" relational table with SubProdTableID, Parent_ProductID, Parent_SubCategoryID columns
These are my needs for these 4 tables.
(PAGE 1)-Public Products "Results" page with Dynamic Menu.
This menu will show the main categories and then the sub categories under each. With many of them repeating in use. And I will be using CSS Menu Writer for this so that the menu will be updated dynamically if the client adds a new sub category.
The links for the Categories will be "#" but the links for the Sub Categories will be something like
products.php?category=[ProductCategoryID]&subcategory=[SubCategoryID] which will then filter the results by using a search behavior, I assume.
For example:
- DOG
- FOOD
- TOYS
- BOWLS
- BEDDING
- FOOD
- CAT
- FOOD
- TOYS
- BOWLS
- BEDDING
- FOOD
- BIRD
- FOOD
- TOYS
- BOWLS
- FOOD
- RODENT
- FOOD
- TOYS
- BOWLS
- BEDDING
- FOOD
(PAGES 2-5)-All the Admin pages for Inserting, Deleting, Updating, Results w/ Search
The search on the Admin page will be Dropdowns where you can search for all "Food" or just "Food" for "Cats". OR all products for "Cats".
I have created JOINs that work for the results but then they don't work for the menus. Should I create a 5th table that relates the Categories with the Sub Categories? Or should I just have one table that includes both and give the Categories a Parent_ID of "0" as I have seen mentioned before?
I was thinking that because I will have Sub Categories repeated under different Categories, that this method won't work.
Relational Tables have to be the hardest thing I have ever tried to learn. I have read books, studied the example databases and drawn lots of diagrams. I know it's going to all pay off, but it's still confusing. For me, video tutorials work the best. Are their any good ones out there? I'll pay for them.
Thanks,
TroyD