From the course: Magento Community Edition 2 Essential Training

Magento categories, part 1

- [Instructor] Before we do anything else involving adding more products, let's learn about categories. Categories are most useful in that they make your site more navigable and your products easier for visitors to find. To manage your categories, click on Products, and then Categories. And this will take us to the page where we can manage all of our categories. We can also add new categories. Now I'll note that you can also add new categories on the fly while creating or editing products. But I don't recommend doing so, and I'll explain why in just a minute. Over here, we have a list of all of our categories which currently is simply the default category. We have the option to add a subcategory or add a root category. We're going to focus on adding subcategories to the default category, because by default, if we look at the front end of our website, once we start creating categories and adding them to the default category, there's going to be a little menu at the top of the screen, and that is where the subcategories are going to be added. But only if for now, if we put them as subcategories of the default category, so that's the simplest way to make this work in an easy to understand fashion. You can use root categories for other things, but we're going to focus on a simple way again to add subcategories that are automatically going to show up in our menu, if we want them to. So we're going to make sure that we have Default Category selected, and of course for us it will be because that's the only one we have. And click Add Subcategory. We want this category enabled, and we do want it included in the menu. Let's create a category for our mugs first. So, we're just going to call this category Mugs, and then if we open the content group, we have a few options here. Let's start with the description, and we'll just say we have a wide variety of beautiful modern mugs in which to enjoy your daily cup of coffee. Now, going back up here, we do have the option to add a category image. What this will do is it will display whatever image you upload at the top of the page that lists all of the products in this category. I'm not going to do that in this case, because in some cases it may be confusing if someone sees for instance a picture of a mug at the top of a page that lists lots of mugs for sale. It's possible some people may be confused and think that that's a product that they can click on and view, and it's just going to add a little bit of unnecessary bulk to the page in my opinion. Of course there are some situations where this would be perfectly fine, and perhaps even desirable to have. In our case, we're going to not upload a category image. We also have this option here called Add CMS Block. Note that this does not make a block for this category page. This is not for creating a CMS Block, but rather for adding a previously created static block onto the category page. Now you'll notice, if we click here that we don't have any blocks to choose from, because we haven't added any static blocks on our site. We will get to blocks later, but if we did have blocks that we had created, if we wanted to add it to our category page, we would click this and select that block from here. Going down, we have our Display Settings group. We'll expand that. For Display Mode, we can show only products, or we can show no products in this category, and only the static block that we selected up here. That's rarely going to be an option that you'll want but it does have its uses. And you can display the static block that we selected up here, and products. Obviously, if you chose a static block up here to be displayed on the categories page, you'll want to make sure that you choose to display static block and products. In our case however, we only want to show products. Then we have this option called Anchor, which may be a little bit confusing. Simply put, keep Anchor marked as Yes if you want layered navigation to be available on this category page. In just about all cases, you'll want to keep it marked as Yes, and if you're not sure, then just keep it marked as Yes. Again, layered navigation is where you'll have a list of attributes, usually in a side bar, that you can filter down results by. So maybe you can filter them by price, or in our case by maybe whether something is decaf or not. If you want layered navigation for this page, keep it marked as Yes. If for some reason you don't, you can easily turn it off. We're going to keep it marked as yes. Then we have Available Product Listing Sort By. When a visitor is viewing your product page, they will have a drop-down menu that allows them to change the attribute by which products are sorted. So, if they select the Product Name, it'll sort the products alphabetically. If they select Price, then it'll sort the products by price. Now don't get this confused with filtering. Filtering will actually remove products from the page, such as if we filter by whether it's caffeinated or not. If we select decaf it will remove all of the caffeinated products and only show us decaf. Whereas sorting simply changes the order that all of the products are displayed in. By default, we have Use All selected for our Available Product Listing Sort By options. In my opinion it's often best to sort by Product Name or Price, or rather to allow customers to sort by product name or price. Maybe not position, so we're going to deselect Use All. We'll click Price and then hold down Control, or if you're on an Apple computer, Command, and then click on Product Name as well. I'll show you what Position is in just a minute once we've added this category to some of our mug products. But some users may be a little bit confused by exactly what position means. Now this also gets to why I prefer, and I think it's best practice to use this page to create new categories. Rather than to create new categories when you are creating or editing products on the fly. Whenever you're editing a product on the fly, and you choose to create a new category while editing that product, all of these options are by default selected. In other words, Use All is selected even if you already have other categories that you've selected only specific attributes for. In a lot of cases, you'll end up selecting things that you don't want customers to be able to sort by, and you can't change that when you're creating categories on the fly. So, again that's why I recommend always creating them here, or just being very careful when you create new categories on the fly, to make sure you go back to this page afterward and edit it in anyway you need. So, we're going to go with Product Name and Price. Then we have Default Product Listing Sort By. This is the sort by method that is used by default when a customer visits the page and hasn't selected any of the options manually. You'll want to use one of the options that you've selected to be available to them, so we're going to deselect Use Config Settings and we'll say go ahead and list everything by Product Name. For Layered Navigation Price Step, when we are displaying layered navigation on a category page, this is essentially the increments of dollars that we want visitors to be able to filter out the products by. So, if we deselected Use Config Settings and chose $15, then they would have options to filter down products from zero to $15, 15 to $30, 30 to 45, and so on, for whatever our price range is. Of course this is going to vary wildly based on what you're selling on your site, but we'll just go with $15 for now. Then we have this search optimization group just as we do for product pages. And again this is more information for the browser and HTML information in general. It's a little bit more for that than it is specifically for search engine optimization, but regardless. For the URL Key, let's just go with mugs. For the Meta Title, let's do capitalized Mugs. Meta Keywords, we'll do coffee, and mugs, and again this information is for just the category page, where the mug products are going to be listed. Not for the individual product pages. And then we can put in a Meta Description. I'll just go back up here and copy the description that we used for the category in general, and paste it right there. Here we can select which of the products on our website we want to add to this category. Of course, on product pages, we can add categories there, but when we're creating a new category, if we already have products on the site that we want to add there, this is a quick and easy way to go ahead and add all of those products in bulk to this category. So again we're working with our Mugs category of course, so we'll add the Camper's Thermos to that, we'll count that as a mug. Our On-the-go Mug, and our Sunrise Mug. So we're just going to select those, and once we're done here, and click Save, this Mugs category will automatically be applied to these three items. Then we have Design and Schedule Design Update, just as we do for other pages, such as product pages. If we want the design of our category page to be different from the rest of the site for whatever reason, we can change those settings here. We can do scheduled design changes as well. But we don't want to do that. We want it just to look like the rest of the site. There's no need for this to look any different from anything else, so we're done here. So we're going to click Save. And now you'll see over here, we have our Mugs category with three items. And if we go back to the front end of our site and refresh the page, now we have this menu with the Mugs option, and if we click on that, we'll be taken to the category page where it shows all of the mugs on our website. Camper's Thermos, On-the-go Mug, Sunrise Mug. Here is the description that we typed in in the content group. We have a wide variety of beautiful modern mugs, and again up here is where the image would be displayed if we wanted an image to be displayed at the top of the category page. Here's our Sort By option. Notice everything is sorted alphabetically right now because that's what we chose as the default. We can also choose to sort by Price, and notice we can click on this arrow to reverse the product name sorting, so reverse alphabetical order. Of course if we choose Price, it'll sort things currently highest to lowest, because we had clicked on the arrow. But we can also reverse that and go lowest to highest.

Contents