Hello to all my fellow PHP friends,
I'm embarking on yet another trecherous adventure. This time Categories,
Sub-Categories and Sub-Sub Categories..
This is for a shopping cart module where the admin can create categories,
sub-categories, and sub-sub categories and then place in a certain sub-sub
category. This is a two fold question, first I will draw an example display
of what I am trying to accomplish.
Example:
Main Category
|
---> Sub Category
|
---> Sub-Sub Category
|
---> Product
Main Category2
|
---> Sub Category2
|
---> Sub-Sub Category2
|
---> Product2
Question 1:
Admin needs to be able to create new sub categories and assign them to a
main category and be able to create a sub-sub category to assign to a sub
category and then a product to assign to a sub-sub category. When adding a
new product the admin needs to select a main category which then creates a
dropdown box for a subcategory, which then (IF admin chooses) create a
dropdown box for a sub-sub category. Any ideas on how to create a function
to handle this? I've seen lots of unstable javascript code to do this (not
to mention difficult to manage)
Question 2:
When displaying the category/sub/sub-sub category listing to the viewers,
whats the best way to handle the output?
Thanks in advance for all your help,
Tony Devlin