官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 伊川县| 娄烦县| 舟山市| 永吉县| 永定县| 南郑县| 格尔木市| 南乐县| 明光市| 富阳市| 肇源县| 平湖市| 青冈县| 桐柏县| 新密市| 昌宁县| 资溪县| 海安县| 托克托县| 东山县| 普兰店市| 高清| 金门县| 富阳市| 瓦房店市| 平陆县| 拉萨市| 文山县| 醴陵市| 海林市| 宜宾市| 南靖县| 布尔津县| 华蓥市| 林芝县| 赣州市| 长岛县| 涿鹿县| 衡阳县| 同仁县| 突泉县|