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

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.

主站蜘蛛池模板: 城步| 紫金县| 木兰县| 莱州市| 股票| 昌邑市| 剑川县| 哈巴河县| 十堰市| 蒙自县| 当雄县| 游戏| 江达县| 安塞县| 彩票| 霍林郭勒市| 新田县| 汉川市| 将乐县| 霍林郭勒市| 图们市| 利津县| 远安县| 陈巴尔虎旗| 微博| 葫芦岛市| 丹东市| 盈江县| 靖安县| 遵化市| 阆中市| 额尔古纳市| 古交市| 景宁| 婺源县| 岗巴县| 钟祥市| 宁陕县| 北宁市| 吴川市| 安达市|