Root Categories
The products in the main menu are determined by the root category that is assigned to the store. The root category is basically a container for the main menu in the category tree. You can create a root category with an entirely new set of products or copy products from an existing root category. The root category can be assigned to the current store or to any other store in the same website.
From the Admin, the category structure is like an upside-down tree, with the root on top. The root has a name, but no URL key, and does not appear in the top navigation of the store. All other categories in the menu are nested below the root. Because the root category is the highest level of the catalog, your store can have only one root category active at a time. You can, however, create additional root categories for alternate catalog structures and different stores.
The following example shows how to create a new root category and assign it to a different store.
Step 1: Create a new root category
On the Admin sidebar, go to Catalog > Categories.
On the left, click Add Root Category.
Assign a Category Name.
The name you choose will initially be assigned to all store views.
If you want to add products to the catalog from the current catalog, do the following:
Expand
the Products in Category section.
Use the search filters to find the products you want and select the checkbox for each product that you want to copy into the new catalog.
When complete, click Save.
Step 2: Build out the main menu
On the left, select the new root category that you created in the previous step.
Click Add Subcategory and follow the instructions to create the category structure for the main menu.
Step 3: Assign the root category to the store
On the Admin sidebar, go to Stores > Settings > All Stores.
In the Stores column of the grid, click the store that you want to assign the new catalog.
Set Root Category to the new root category that you created.
Make sure that the store has a Default Store View assigned.
The store must have at least one store view.
When complete, click Save Store.
To verify that the store has a new catalog, do the following:
On the Admin sidebar, go to Catalog > Products.
Any products that were copied to the new catalog appear in the grid.
Visit the storefront to verify that the new catalog and main menu are working correctly.
Hidden Categories
There are many ways to use hidden categories. You might want to create additional category levels for your own internal purposes, but show only the higher-level categories to your customers. Or, you might want to link to a category that is not included in the navigation menu.
Create hidden categories
On the Admin sidebar, go to Catalog > Categories.
In the category tree, select the category you want to hide and do the following:
- Set Is Active to
Yes
. - Set Include in Menu to
No
.
- Set Is Active to
In the Display Settings section, set Anchor to
No
.The hidden category is active, but does not appear in the top menu, or in layered navigation.
Complete the following settings for each hidden subcategory to create subcategories:
Although the category is hidden, you can create subcategories beneath it and make them active.
- Set Enable Category to
Yes
. - In the Display Settings section, set Anchor to
Yes
.
- Set Enable Category to
As active categories, you can now link to them from other places in your store, but they will not appear in the menu.
When complete, click Save.
Modifying a Category
After a category is established, it can be edited, moved to another position in the category tree, or deleted from the catalog. If your catalog is live, first consider how the change might impact any existing links to products in the category. For example, if your product URLs include the category path, and the category name is changed, any existing links to products in the category will be broken. To avoid this problem, you can configure your catalog to automatically create a permanent redirect if the URL key changes. You can also use the URL Rewrite tool to redirect traffic from an old URL to a new one.
Move a category
On the Admin sidebar, go to Catalog > Categories.
To move a category, drag-and-drop the category to a new position in the tree.
Changes to the category structure are saved automatically.
Delete a category
In the category tree, select the category that you want to delete.
A deleted category cannot be restored, so make sure that you have selected the correct category before proceeding.
Click Delete Category.
When prompted to confirm, click OK.
You can also update the events associated with a category from either the Events page or the Category page.