Magento Product Catalogue: The Masterclass (Step 1)

Step 1 of 6: Attributes - The first 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 attributes - what they are and how to create them.
Published on Dec 9 2014 by Marco Rosano

If you’re not confused, you’re not paying attention.

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 ...

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 will cover step 1 - product attributes. The following steps will be covered in a series of future posts.

The Concept 

Atttributes are any individual piece of information about the product. These pieces of information will be stored in your product catalog and can be used to search, filter and sort your products for your customers.

Magento has a list of 'system attributes' which are required for Magento to function correctly. This includes things like: 

  • name
    This name is visible on your product description page as well as anywhere this product is listed (category pages, search results, ‘related product’ listings, etc).
  • description
    A detailed description of the product, used for marketing the product to your customers. This is the main way customers learn about your product, and can include images, videos and formatted (“rich”) text.
  • short_description
    Like it says on the tin, a short description of the product. Your chosen site theme will use this field in a different ways, however it is typically used in product listing pages (like category pages) and search results.
  • sku
    This stands for ‘Stock-Keeping Unit’, and is “a unique product identification number that is used to track inventory items” - a product code or model number is typically entered for this field.
  • weight
    The product weight, in a unit of your choosing. Make sure all products use the same units. This is used for calculating shipping costs if you shipping method requires it for calculations. 
  • status
    When set to ‘Enabled’ (‘1’), the product is available for sale and visible on the website. When ‘Disabled’ (‘2’), the product is not listed in the catalog on your website. 
  • visibility
    Specify whether this product is visible from the catalog, search, both, or neither. Values include: 
    ‘0’ (Not Visible Individually)
    ‘1’ (Catalog)
    ‘2’ (Search)
    ‘3’ (Catalog, Search) - This is the most common setting, unless you have unique requirements for your product.
  • price
    The product price, in the currency set in your website settings. This is the price the product is listed for sale in your catalog.
  • special_price
    Overrides the ‘Price’ field to show a special price. You can also use the ’special_from_date’ and ‘special_to_date’ fields to have the product show the sale price only for a specified date range.
  • tax_class_id
    Determines which tax rules to apply to the product. The value is based on the id # next to each product tax class set in Catalog > Tax.

All these standard types of fields are part of every product in Magento, and a required to be set for every product in your catalog.

For a complete list of standard product attributes (required and not required) can be seen on the Magento website.

How Attributes Work

Attributes have a name and also have values. Additional attributes could include things like:

  • ‘Size' (attribute) could be set to ‘Small', ‘Medium', ‘Large' (attribute values).
  • ‘Material' (attribute) could be set to 'Stainless Steel', ‘Wood', ‘Plastic' (attribute values).
  • ‘Length' (attribute) could be set to ‘0.5mm’, ‘15cm', ‘0.5m', ‘150m' (attribute values).

Note: You don't need to list every single product specification as a product attribute. Think of it as a way for customers to filter product when viewing a whole category.

“I want to see ovens (category) that are: stainless steel and have 4 burners (attribute values)"; or
“I want to see all t-shirts (category), in all styles, in my size (attribute); which is medium (attribute value)". 

So you only need to create and set an attribute for a product if you can see a customer wanting to refine their search with that information.

Here's an example of the attributes being used for filtering products with the standard, 'demo' Magento theme:

Magento Layered Navigation Example

Under the 'Shop By' heading in the sidebar on the left, 'Category', 'Price', 'Color', 'Manufacturer' and 'Shoe Type' are all attributes. Under the 'Color' attribute, 'Black', 'Blue', 'Brown', 'Gray', etc are all attribute values.

Magento Layered Navigation - Attribute

By clicking on any of these attribute values, the list of products on the page will be filtered to show only products that have that attribute value (for example, all products with 'Color' set to 'Black').

Note: Attributes can belong to more than one attribute set (we'll talk about attribute sets in a the next post in this series). So 'Size' could belong in 'Clothing' and 'Shoes’. When creating the attribute, you set it to all possible values that all of your products need it to be.

 So for example, size could have possible values of:

  • Extra Small (the clothing sizes)
  • Small
  • Medium
  • Large
  • Extra Large
  • 7 (the shoe sizes)
  • 8
  • 9
  • 10
  • 11
  • 12

What You Need to Prepare

An attributes list which has a list of attribute names, and which values they can be, e.g.:

  • Size
    • Extra Small
    • Small
    • Medium
    • Large
    • Extra Large
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
  • Shelves
    • 2
    • 3
    • 4
  • Exterior Finish
    • Stainless Steel
    • White
    • Black
    • Ceramic White

Add the Attributes in Magento

Once you have your complete list of all attribute values, you can login to your Magento backend and start adding in your attributes and their values. 

Go to Catalog > Attributes > Manage Attributes. A list of existing attributes is shown. If you have a new Magento store, this will be the list of system attributes.

Magento - Manage Attributes 

Click on the ‘Add New Attribute’ button (top right of the list) to create a new attribute.

 You'll then be shown the add edit attribute screen.

Magento - New Attribute - Properties

  1. In the Attribute Code field, specify a unique identifier for this attribute. Do not use spaces. The code does not appear on the frontend.
  2. In the Scope field select the scope to which this attribute applies. If you only have one website on your Magento installation, 'Global' is a good choice for this field.
  3. The Catalog Input Type for Store Owner setting controls how a store administrator specifies values for attributes. For descriptive textual attributes, you can use the Text Field or Text Area types; for list prices you use the Price type. Note that not all types can be used for layered navigation - most of the time this should be set to 'Dropdown'.
  4. If this attribute has a default value, specify it in the Default Value field. This can save time when creating lots of products if lots of them have the same value for a particular attribute.
  5. If the value of the attribute must be unique for each product (for example, a SKU number), select Yes for Unique Value. If you set this to Yes, you won't be able to use the field for layered navigation.
  6. If the value of the attribute cannot be blank for any product, select Yes for Values Required.
  7. In the Input Validation for Store Owner field, select the type of validation that should be enforced on values of this attribute. For example, if the values of this attribute will be email addresses, select Email to cause the system to check each entered value of this attribute against the rules for valid email addresses. Most of the time you don't have to set anything for this field.
  8. If this attribute will apply only to certain product types, select Selected Product Types for Apply To. In the list that appears, select one or more product types for this attribute (use Ctrl+click to select multiple items).
  9. For Use in Quick Search and Use in Advanced Search, select Yes to enable the quick search and advanced search tools to search this attribute’s values.
  10. For Comparable on Front-end, select Yes to have this attribute appear in the compare window when products are compared.
  11. The Use in Layered Navigation field defines whether the attribute is used in layered navigation. The following options are available:
    • Filterable (with results): Only those attribute values that correspond to the existing products in your frontend catalog will be used in the layered navigation.
    • Filterable (no results): All values of the attribute that you have created on the Manage Label / Options tab will be listed.
    • No: Not used in layered navigation.
      Note that only attributes with the Dropdown, Multiple Select, or Price input type can be used in layered navigation.
  12. The Use for Promo Rule Conditions, field defines whether the attribute can be used in defining conditions for catalog and shopping cart price rules.
  13. The Position parameter determines the position of the attribute in the layered navigation block with respect to other filterable attributes.
  14. In the Visible on Product View Pages on Frontend field, select Yes to specify that this attribute appears in the Additional Information part of a product’s page in the web store.

    Magento Product Page - Attributes

  15. For Allow HTML Tags on Frontend, select Yes to enable HTML tags that are specified in this attribute’s values to be honored on the frontend.
  16. For Used in Product Listing, select Yes to list values of this attribute in the product listing.
  17. For Used for Sorting in Product Listing, select Yes to enable the product list to be sorted by values of this attribute. 

Now you have to set the attribute values. 

  1. Click Manage Label/Options at the top left of the page to display the Manage Label/Options page.
  2. In the Mange Titles box, specify a display name for this attribute for each store view. If you specify a value only in the Admin field, that value will be used in all cases.
  3. For attributes with an input type of Dropdown or Multiple Select, you can enter values that can be specified for the attribute. To add a value, click the Add Options button. You can specify a different label for the value for each store view and set the default value by selecting the Is Default option button. For the Dropdown input type, you can select the Is Default option button only for one attribute value. For the Multiple Select input type, you can select multiple values by selecting the Is Default check box next to the desired attribute values.

    Magento New Attribute - Values 2

  4. Click Save Attribute.

 Repeat this process for each of your new attributes that you need to setup.

Once you're done, you're ready to start setting up your attribute sets, which you can read all about in the next article.

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.