parent_id to any category — making it a subcategory of another. Each category also has an is_active toggle that controls whether it appears on the storefront without requiring you to delete it.
Category fields
Each category record contains the following fields:The
slug is automatically derived from the name when you create a category and leave the slug field blank. If you edit the slug manually, the auto-generation stops for that session so your custom value is preserved.Hierarchical categories with parent_id
Setting parent_id on a category makes it a child of another category. This lets you build multi-level category trees — for example:
- Electronics (top-level,
parent_idis empty)- Phones (
parent_id= Electronics) - Laptops (
parent_id= Electronics)
- Phones (
In the category table, the Parent Category column resolves the
parent_id to its display name automatically. If the parent category is deleted or unavailable, the column shows a dash.Creating a category
1
Open the Categories page
Navigate to Categories in the sidebar. Click New Category (or the equivalent create button) to open the category form.
2
Fill in the required fields
Enter a Name (required, minimum 2 characters) and a Slug (required, minimum 2 characters). The slug auto-populates as you type the name — you can leave it as-is or customize it.
3
Add optional details
Optionally add a Description, select a Parent Category from the dropdown to nest this category under another, and upload an Image to represent the category visually.
4
Set the active state
Use the Active toggle to control whether the category is visible on the storefront immediately. It defaults to active (
true).5
Save the category
Submit the form. The new category appears in the category table and is immediately available for assignment to products.
Editing a category
To edit an existing category, open the row actions menu (the ⋯ icon) next to the category in the table and select Edit. The same form used for creation opens pre-filled with the current values. Update any fields and save. Theslug field is editable — changing it will update the category’s URL path on the storefront.
Toggling a category’s active state
You can activate or deactivate a category without deleting it. In the row actions menu, select Activate or Deactivate depending on the current state. Theis_active field is updated immediately and the category table reflects the new status with a badge.
Deleting a category
To permanently remove a category, open the row actions menu and select Delete. A confirmation dialog appears before the deletion is committed. Deleting a category does not automatically remove products assigned to it — products retain theircategory_ids references and must be updated separately if needed.