Adding global product attributes

In addition to using categories and tags similar to WordPress posts, there's one extra way that you can categorize your products, and that is by using product attributes. Product attributes are things such as color, size, style, and so on. A simple product could have multiple attributes. A small red and blue t-shirt could have the following attributes: red, blue, and small.

Setting up global product attributes will make creating variable products easier down the road.

How to do it…

Make sure you already have a simple product in your store and proceed with the following steps:

  1. From the WordPress admin, go to Products | Attributes.
    How to do it…
  2. Under the Add New Attribute heading, you'll see settings to create attributes. The only mandatory field is Name.
  3. Enter a name for the attribute and click on the Add Attribute button.
  4. Now click on the icon on the far right in the Attribute table. When you hover over the button, you should see Configure terms.
    How to do it…
  5. Enter a name for an attribute term. If your attribute is Color, then the attribute terms will be specific colors such as red, black, blue, white, and so on. Repeat this step for each attribute term. At the end, you should have a list of attribute terms.
    How to do it…

We've created a product attribute and some attribute terms. Now we can add them to our products.

  1. From the WordPress admin, go to the Product page and click on Edit for any one of your products.
  2. Under the Product Data panel, click on the Attributes tab.
  3. You should see a drop-down with a list of attributes. Select your attribute and then click on the Add button.
    How to do it…
  4. Start typing in the attributes that apply to this product. As you type, a suggestion tool will pop up that helps you select an attribute.
    How to do it…
  5. Now save your product by clicking on the Update button.

There's more...

If you check the Visible on the product page checkbox under the attribute you selected on the Attributes tab in the Product Data panel, these attributes will show up on the product page in an Additional Information tab.

There's more...

In Chapter 3, Changing the Product Organization, there's a recipe (Adding filtered navigation with the Layered Nav widget) that details how to filter your products with the Layered Nav widget. By adding attributes to your products, you make it easier for users to navigate your store and search for your products.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset