Time for action—adding a category and subcategory under it
In this section, we will add Men's shoes as a parent (top) category for our store. Then, we will add a Athletic subcategory under it.
Let's open the Catalog | Categories menu.
We will click on the Insert button next.
Let's fill in the general category data similar to the following screenshot by Category Name, Meta Tag Description, and Description. Then we will click on the Data tab.
We should choose the Default store name from the Stores list and click on the Save button. We can disable a category showing in our store by changing Category status. The default value is Enabled. We can also arrange categories in a way that they will appear in the order we want using Sort Order field. By default, it is 0.
We will talk about SEO Keyword field in one of the later chapters. Leave the other fields on their default settings.
Note
We can run more than one store on a single OpenCart installation. We will explore the topic of creating new stores in later chapters. For this chapter, we will be doing operations on Default installed store.
We have finished adding the Men's shoes category. Now, let's click on the Insert button to continue adding the subcategory.
We fill in the general information for the Athletic subcategory similar to the following screenshot. Then, let's click on the Data tab.
We choose Men's shoes as Parent Category in order to place the Athletic category as a sub-category under Men's shoes. Let's choose Default store. We will click on the small icon on the Image field to add a new image for the category.
Image manager will be opened. We will see a list of pre-uploaded images for the sample store. Let's continue by clicking on the New Folder menu item. A pop-up box will be opened. Let's enter shoes as a new folder name and click on the Submit button.
We have now shoes directory under the image directory. Let's click on the Upload menu item.
After we upload an image from the local computer, we will see that the image is available for usage. Let's double click on the image.
Finally, we have attached an image for the category. Let's click on the Save button to complete the process.
Let's browse to our store and browse the Men's shoes category. Notice that some of the information we have provided for these categories have appeared: the description field for men's shoes and image for Athletic sub-category.
What just happened?
We have added a Men's shoes category and Athletic subcategory under it. Notice that we have carefully written, detailed text in the meta description field for both categories. It is important to not neglect this field because search engines use meta HTML tag data to help indexing the pages. Adding related images on subcategories also helps the website become visually more attractive. We could also optionally enable/disable a category at any time and decide the sort order of categories.