Magento Product Catalogue: The Masterclass (Step 3)

Step 3 of 6: Categories - The third post in a series to help guide you through adding your entire product catalogue into the Magento CMS, one concept at a time. This article covers product categories - what they are and how to create them.
Published on Feb 12 2015 by Marco Rosano

One step at a time is the best way to walk.

In this series, I will attempt to tell you everything you need to know to understand the terms and concepts behind how Magento will store and manage your product catalogue, and the way that we've found works the best for our clients to get everything working in the best way possible.

Doing the product import right the first time has been a rare unicorn in our experience, so we've created this process to eliminate forgotten steps, and make sure you've thought about everything you need to before you're too far in and don't want to have to start over. Let the clouds of confusion disperse …

See step 1 of this process (Product Attributes) for more information on how to get started.

Here's a typical outline of the process that we follow for importing products into a Magento website:

  1. Product Attributes

    Prepare a list of product attributes that need to be added to the site, with which attribute set each product needs to be added to.
  2. Product Attribute Sets

    Prepare a list of product attribute sets that need to be added to the site.
  3. Product Categories

    Prepare a list of product categories that products will be allocated into.
  4. Product Data Fields (Simple Products)

    Insert all your product data into an import spreadsheet to include all information required for the products, for example, name, description, price, etc.
  5. Product Data Fields (Configurable Products)

    Create configurable products for all products that have options (an example with clothing would be a S/M/L size attribute, or a furniture product could have stainless steel/black for a material attribute), and link each configurable product with all associated (child, simple) products.
  6. Product Images

    Upload product images for all products, associate them with the correct products.

This article describes how to display and create categories and subcategories, as well as explaining what the hell a 'root category' is.

The Concept

The products in your online store can be grouped into categories to make them easier to browse for your customers. Categories enable you to give your store structure and form.

You can assign a product to one, many or no categories.

Root Category

With Magento, you can manage multiple stores (and even websites) using the same installation of Magento. What this means is there is an extra layer of categorisation that needs to happen to make sure the correct products appear in the correct store(s).

Each store you create is assigned to a unique category, called the Root Category. Any other category that you want to use in your store must be created as a subcategory. All categories are technically considered subcategories because you are placing them under the "root category".

Even if you have just one store on your Magento installation, you still need to use a Root Category; it's required for core functionality.

Adding Categories

To display a list of all categories, in your Magento admin area, select Catalog > Manage Categories. The categories are displayed in a tree view on the left. On the right you will see options to edit a selected category.

Magento Category Tree

Create a New Category

To create a new category:

  • There should be a root category already waiting for you for your first store. However if you're creating a second/third/fourth/etc store, you will need to create an additional root category. To create a new root category, make sure that Choose Store View in the top left corner of the page is set to Default Config, and click Add Root Category. You only need one root category per store.
  • To create a subcategory, select the parent category (it can be either a root category or a category) in the list and click Add Subcategory. This will add a new category as a child (sub-category) of the one you clicked on.

After clicking one of the add buttons above, you will see on the left that there are four tabs of information that contain different kinds of settings for your new category: General Information, Display Settings, Custom Design, and Category Products. Fill out the relevant information in each tab; more details on each tab are below.

General Information

In this tab, you are asked to provide a category name, description, images (used to represent your category) as well as meta keywords and description for better search engine positioning.

Magento Category Edit - General Info

  1. Specify a name for this category in the Name field.
  2. Set the Is Active field to Yes to specify that this category appears in the store.
  3. In the URL key field you can specify a relative URL path which can be entered in place of the standard Target Path. It is “search engine friendly” because it can use the name of the category instead of the ID number. If you leave this field blank, Magento will automatically generate a URL with the name of the category upon creation of the category. If you enter a value here manually, you cannot use spaces in this field (use hyphens '-' instead). The URL key field is not displayed for root categories, because you can't actually view a root category on the frontend.
  4. For Thumbnail Image, use the Browse button to select and upload a thumbnail image to represent the category. Depending on your theme, this field may not be used.
  5. Specify a description in the Description text box. This description is presented on the frontend.
  6. The Image field is used for a category image. Click the Browse button next to the field to select the file. This image will usually appear in the frontend for each category’s page between the category name and the content. However it could be different, depending on your site theme.
  7. In the Page Title field, specify the title of the page, which will be displayed on the browser tab header when the customer opens this category page.
  8. In the Meta Keywords and Meta Description text boxes, specify the keywords and description for search engines to use for this category when indexing your site.
  9. Select Yes for Include in Navigation Menu so that the category will appear in the navigation menu on the frontend.
  10. Click Save Category to save your changes.

Display Settings

The Display Settings tab lets you to tweak how this category is presented to your customer.

Magento Category Edit - Display Settings

  1. In the Display Mode field, select one of the following options to specify how you would like your category page to appear. In most cases, you will want this to be set to 'products only'.
    • Static block only
    • Static block and product list below it
    • Product list only
  2. In the Is Anchor field, select Yes to specify that this category page is an anchor. Anchors are used for the layered navigation in Magento.
    • If you set the category to be an anchor for Layered Navigation, then your web store displays the subcategories of this category in the SHOP BY panel on the left. This area also shows a linked list of the filterable attributes of the products in this category and its subcategories.
    This example shows the SHOP BY panel for the Apparel category, which is set as an anchor. 
    Magento Shop By (Layered Navigation)
  3. For Available Product Listing Sort By, specify the attributes by which the customer can sort the list of products in this category. By default, all available attributes can be used for sorting; but you can clear the Use All Available Attributes check box to modify the list if you wish.
  4. For Default Product Listing Sort By, select the attribute by which the product list is sorted by default. This is set in the catalog configuration, but you can clear the Use Config Settings check box to select a default sorting attribute for just this particular category.
  5. For Layered Navigation Price Step, specify the size of the price range to be used when calculating the price “buckets” for the Layered Navigation. This is set in the catalog configuration, but you can clear the Use Config Settings check box to specify a price range size for this particular category if you wish.

Custom Design

This tab contains additional settings to control the theme and layout updates that are used for this category page. Depending on the settings they can also affect child pages as well. All of these settings are optional. In most cases, you won’t need to do anything in this tab unless there’s something special we need you to do for your site.

Catalog Products

This tab enables you to quickly specify the products that belong to this category. You don't have to fill this in right now, you can always come back later. You can also set the categories for a product by editing the individual product.

Magento Category Edit - Catalog Products

  1. If needed, use the filter fields at the top of the table to filter the list of products. Click Reset Filter to clear all filter settings.
  2. Select the check box in the left column for each product that belongs in this category. Remember that a product can be assigned to more than one category.
  3. Optionally, in the Position column, you can specify a (whole) number that indicates the order in which the product is listed when the products are sorted by Best Value. The product with a Position value of 1 is listed first, 2 is listed second, and so on. If more than one product has the same value for Position, the product with the lowest (that is, closest to 1) ID number is listed first.
  4. Click Save Category to save your changes. You may need to refresh the page to display the category in the tree.

 

Repeat this process for each of your new categories and sub-categories that you need to create.

Edit Existing Categories

You can edit any of your categories later by simply clicking on the category in the tree on the left, editing its information and clicking Save Category.

Bulk Add/Edit Categories

You might have heaps of categories to add, or have just spent hours setting up your categories just right and discovered that you need to change one field on all of the ones you've just setup. And of course, some people just prefer the world of spreadsheets.

We regularly use an excellent extension that can help with bulk importing your categories, or bulk exporting and re-importing (i.e. bulk editing) your categories if there's lots you want to change. Check it out here:
Bulk Category Import/Export on Magento Connect

Once you're done, you're ready to start adding your first set of products, FINALLY! Stay tuned for a future post on the best process for that.

Free advice from an agency?

We specialise in online store development, and have many years and many online stores' worth of experience in what works and what doesn't. We've used many platforms and have put them all through their paces - and our favourite at the moment is Magento for is flexibility, expandability, and huge community of developers who actively develop the platform and are continually improving it.

We're writing this series for the benefit of the Magento user community, as the open-source movement has given so much to the web industry, we want to give back. We know what we're doing, and want to share some of that knowledge with you for the benefit of everyone.