Lokzon Logo

Category Management

A complete guide to organizing your products on Lokzon using categories and subcategories — creating, editing, reordering, and managing category images.


Part 1: The Categories Page

1.1 Accessing Categories

Go to /dashboard/categories from your dashboard navigation. This page lets you organize your entire product catalog using a tree of categories and subcategories.

1.2 What You See

  • A search bar at the top to find a category by name.
  • A "New Category" button (with a plus icon) in the top right.
  • A categories table showing each category with:
    • An expand/collapse chevron (only for categories that have subcategories).
    • A thumbnail or initials icon.
    • The category name with a "Main" badge on top-level categories.
    • Action buttons: Edit and Delete.

1.3 Tree Structure

Categories are organized in a two-level hierarchy:

  • Main category: The top level (depth 0). Example: "Electronics", "Fashion", "Food & Beverages".
  • Subcategory: A child of a main category (depth 1). Example: "Electronics > Smartphones", "Fashion > Men's Shirts".
  • Sub-subcategory: A child of a subcategory (depth 2). Example: "Electronics > Smartphones > Cases & Covers". Beyond depth 2, the system does not allow adding further children.

Each level is shown indented by 22 pixels per level, making the hierarchy visually clear.

Type any keyword in the search bar. The table filters in real-time to show categories whose name contains the keyword. The tree structure is preserved while filtering — parent categories stay visible so you can see where matched subcategories live.


Part 2: Creating a Category

2.1 Opening the Create Dialog

Click the "New Category" button in the top right. A dialog opens.

2.2 The Create Dialog

The dialog contains three sections:

Placement

  • A radio button group with two options:
    • Create as a main category (no parent).
    • Create under [Category Name] — this option appears when you click "Add subcategory" from a specific row.
  • A live path preview showing where the new category will sit in the tree. Example: Main / Electronics / Smartphones.

Name and Description

  • Name (required): The category name as it appears to customers. Minimum 2 characters.
  • Description: An optional short description of what belongs in this category.

Image

  • An image upload area. Click to upload an image file (PNG, JPG, WebP). You can also see a preview of the currently uploaded image and an X button to remove it.
  • The image is shown next to the category name in the table and on your storefront.

2.3 Saving the New Category

Click "Create" at the bottom of the dialog. The new category appears in the table immediately. A toast notification confirms the save.


Part 3: Editing a Category

3.1 Opening the Edit Dialog

Click the pencil (Edit) icon next to any category. A dialog opens with the same layout as Create.

3.2 What You Can Change

  • Name: Rename the category. The change is reflected across your storefront and product pages.
  • Description: Update or add a description.
  • Parent: Move the category to a different parent (or to the top level to make it a main category). You cannot move a category under one of its own descendants.
  • Image: Replace or remove the category image.

3.3 Live Path Preview

As you change the parent selection, the path preview updates in real-time to show where the category will end up after saving.

3.4 Saving Changes

Click "Save" to apply your changes. The category updates in the table immediately.


Part 4: Deleting a Category

4.1 Opening the Delete Confirmation

Click the trash (Delete) icon next to any category. A confirmation dialog opens.

4.2 What Happens When You Delete

  • Deleting a main category: All subcategories and sub-subcategories under it are also deleted (cascade delete). All products in those categories become uncategorized.
  • Deleting a subcategory: Products in that subcategory move up to the parent category (or become uncategorized if there is no parent).
  • Deleting a sub-subcategory: Products in that sub-subcategory move up to the parent subcategory.

4.3 Confirmation

The dialog shows the category name being deleted and a warning about the cascade effect. Click "Delete" to confirm, or "Cancel" to abort.

Important: Category deletion cannot be undone. Any products that lose their category become uncategorized until you reassign them.


Part 5: Adding a Subcategory

5.1 From a Category Row

Hover or click on any category row to reveal additional action buttons (depending on the depth). The "Add subcategory" button is available for main categories (depth 0) and subcategories (depth 1).

5.2 The Subcategory Dialog

Clicking "Add subcategory" opens the same create dialog, but the parent radio is preset to "Create under [parent category name]" with a live path preview like:

Main / [Parent Category] / New Subcategory

5.3 Depth Limit

The system allows up to depth 2 (sub-subcategory). The "Add subcategory" button is hidden on depth 2 categories to prevent deeper nesting.


Part 6: Expanding and Collapsing the Tree

6.1 The Chevron Control

Each category that has children shows a small chevron icon (right-pointing when collapsed, down-pointing when expanded). Click the chevron to expand or collapse its children.

6.2 Visual Behavior

When collapsed, only the parent category row is visible. When expanded, all direct children are shown, and they may also have their own chevron if they have children. The indentation increases by 22 pixels per level.

6.3 Search and Tree State

When you use the search bar, the tree state is preserved. If a parent is collapsed but a child matches your search, the parent stays visible (so the hierarchy is preserved), but you might need to expand the parent to see the child row clearly.


Part 7: Working with Categories from the Product Page

7.1 Inline Category Creation

When adding or editing a product, if the category you need does not exist yet, you can create it without leaving the page. In the "Category" dropdown in the publish panel sidebar, click "Create New Category" (if available). A small dialog opens where you enter:

  • Category name (required, min 2 characters).
  • Description (optional).

The new category is saved and immediately selected for your product.

7.2 Assigning Categories to Products

In the product form, open the "Category" dropdown and select the category that fits. The category is associated with the product on save. Products can only belong to one category at a time.


Part 8: Category Behavior in the Storefront

8.1 Customer-Facing Category Pages

Once categories are set up, customers can browse them at https://<your-store>.lokzon.com/categories/<category-slug>. The page shows:

  • A header with the category name and image.
  • A grid of products in that category.
  • A nested sidebar or breadcrumb showing the path (e.g., Home / Electronics / Smartphones / Cases & Covers).

8.2 Subcategory Browsing

When a customer visits a main category, they see all products directly in that category and any products in its subcategories. Subcategories are listed as filter chips or a sidebar menu.

8.3 Search and Filtering

The category page integrates with the storefront search. Customers can search within a specific category, and the filters (price range, tags, etc.) work on top of the category browse.


Part 9: Best Practices

9.1 Plan Your Structure

Before creating categories, sketch out your tree. Think about:

  • The top-level main categories that represent your major product lines.
  • The subcategories that group similar products within each main category.
  • Whether you really need depth 2 (sub-subcategories). Most stores do well with one or two levels.

9.2 Naming Conventions

  • Use clear, customer-friendly names. Avoid internal jargon.
  • Use the same naming style throughout — either all singular or all plural (e.g., "Smartphone" vs "Smartphones").
  • Keep names short — under 30 characters works best for navigation menus.

9.3 Images

  • Use a square image (e.g., 512x512 pixels) for consistency.
  • Keep file sizes small (under 200 KB) for fast page loading.
  • Use simple, recognizable visuals — solid colors or icon-style images work better than photographs for category thumbnails.

9.4 Reassign Products Before Deleting

Before deleting a category, reassign any products in it to a new category. This avoids losing the category association for products that may otherwise become uncategorized.

9.5 Avoid Deep Nesting

Stick to depth 2 maximum. Deeper trees make navigation confusing for customers and harder for you to maintain.


Part 10: Quick Reference

Pages

PageURLPurpose
Categories List/dashboard/categoriesView, search, and manage all categories

Common Actions

ActionHow
Create a main categoryClick "New Category" → leave parent as "Create as a main category"
Create a subcategoryClick "Add subcategory" on the parent row
Edit a categoryClick the pencil icon next to the category
Delete a categoryClick the trash icon → confirm
Expand/collapse treeClick the chevron next to a category with children
Search categoriesType in the search bar at the top
Reassign productsEdit each product and change its category

Depth Limits

LevelDepthAllowed
Main category0Yes
Subcategory1Yes
Sub-subcategory2Yes (max)
Deeper3+No

End of Guide

Your product catalog is now organized into a clear, hierarchical structure that makes it easy for customers to browse and find what they need.

On this page