Category with subcategories

startpoint

Active Member
Need to create product catalog with categories and subcategories:
"category 1" - 2-nd level "category 11" - 3-th level "category 111"
"category 2" - 2-nd level "category 21" - 3-th level "category 211"
"category 3" - 2-nd level "category 31" - 3-th level "category 311"
How to realize parent category with child categories?
Please, give a scenario.

Regards
 
Hi

Initially you need to create 3 tables:
Categories
Subcategory 1st level
Subcategory
--------
Category: id, category
Subcategory 1st level: id, category_id, subcategory1
Subcategory 2nd level: id, category_id, subcategory1_id, subcategory2
--------
Then you make the Product catalog table:
Product catalog: id, category (DB Join to Category table), subcategory1 (CDD element join to Subategory 1st level / changes when the category changes), subcategory2 (CDD element join to Subategory 2nd level / changes when the subcategory1 changes)

You select the id's as value and names and labels.
 
Take a look at this thread

I can't post a URL, so just replace the end of the url of this page with this one:

?threads/recipe-how-to-use-nested-sets-i-e-hierarchical-data-in-fabrik.38437/
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top