Category y sub category y subsub category

I am making an EBAY-type web application but I find myself stopping on the topic of product categorization.

I want to categorize them 3 levels deep.

can someone help me with an example.

Create a menu and then a menu that depends on the previous selection is displayed and then another menu that depends on the previous selection is displayed.

Yes, I understand, but how do I do it in

Create a table called Category’s.

Category title - text
is_main_category - yes/no
is_sub_category - yes/no
Parent Category - Category
Sub Categories - list of Categories

then you can start adding categories with a parent category.

you will want to run a workflow to update the Sub Categories line, you could just rely on searchs for the sub categories but this would not be ideal if you have lots of categories as you will have to many recursive searches and it will be slow.

1 Like

Thanks I already found a very good explanation

This topic was automatically closed after 70 days. New replies are no longer allowed.