Fields & actions
Page header
| Control | Permission | Action |
|---|---|---|
| Import | categories.create | Opens the CSV/Excel category import wizard |
| Add Category | categories.create | Opens create dialog for a new root category |
Summary rail (KPI cards)
| Metric | Meaning |
|---|---|
| Total | All product categories for the tenant |
| Active | is_active = true — visible to catalog |
| Inactive | is_active = false — hidden |
| Root | Top-level categories with no parent |
| Storefront | Categories with at least one storefront mapping |
Toolbar
| Control | Action |
|---|---|
| Search | Filters by name, description, or mapped storefront label; keeps parent branches visible when descendants match |
| All / Active / Inactive | Status segment filter on the tree |
| Expand / Collapse | Opens or closes every branch in the tree |
| Refresh | Clears cache and refetches categories, storefront categories, mappings, and product counts |
Tree columns
| Column | Content |
|---|---|
| Category | Folder icon (parent) or package icon (leaf), name, expand chevron |
| Products | Count of products assigned to this category, or — when zero |
| Storefront | Mapped menu labels (up to two badges + “+N”), or Not mapped |
| Status | Green/gray dot with Active or Inactive label |
| Actions | Add subcategory, Edit, and More (⋮) menu |
Row actions
| Action | Permission | Result |
|---|---|---|
| + (Add subcategory) | categories.create | Opens create dialog with parent fixed |
| Pencil (Edit) | categories.edit | Opens edit dialog |
| ⋮ → Add subcategory | categories.create | Same as + |
| ⋮ → Rename | categories.edit | Opens edit dialog |
| ⋮ → Duplicate | categories.edit | Creates a copy with storefront mappings |
| ⋮ → Activate / Deactivate | categories.edit | Toggles is_active inline |
| ⋮ → Delete | categories.delete | Opens delete confirmation with impact check |
Tree footer
| Element | Meaning |
|---|---|
| Showing X of Y | Visible rows vs total categories |
| Clear filters | Appears when search or status filter is active |
Category form fields
| Field | Required | Notes |
|---|---|---|
| Category name | Yes | Trimmed on save |
| Taxonomy parent | No | Hidden when adding a child from a row; null = root |
| Description | No | Optional text |
| Active | No | Defaults to on |
| Storefront category mappings | No | Many-to-many via checkboxes; search filters the list |
Import wizard fields
| Mapped column | Purpose |
|---|---|
| level_1 … level_4 | Hierarchy by column (up to four levels) |
| name + parent_name | Single category with optional parent |
| path | Full breadcrumb path separated by >, /, or | |
| description | Optional per leaf row |
| is_active | Optional; accepts true/false, yes/no, active/inactive |
Delete rules
| Condition | Behaviour |
|---|---|
| Child categories exist | Delete blocked — dialog lists count |
Products reference category_id | Delete blocked — dialog lists count |
| Neither | Delete allowed |
Auto-generated fields
| Field | Set by |
|---|---|
slug | Database trigger on insert/update — shown read-only when editing |
tenant_id | Current tenant context |