How to use attributes in WooCommerce Product Table
Our WooCommerce Product Table plugin fully supports product attributes. You can display attributes in a table, sort by attribute, filter by attribute, or even list products with specific attributes. This article summarizes the different ways in which you can use attributes with WooCommerce Product Table.
Global or product-specific attributes?
First, you need to decide how to add your attributes because WooCommerce provides two ways to do this.
In WooCommerce, you can either create attributes globally and then select them for each product; or you can add attributes individually for each product.
We generally recommend adding your attributes globally under Products → Attributes and then selecting them for each product. This is because global attributes are easier to use for groupings multiple products, and you can only add filter dropdowns if you’re using global attributes.
You can list each attribute as a separate column in the product table. For example, you can create one attribute column for an attribute called ‘color’, and another for an attribute called ‘size’. If a product has more than one value for each attribute, then this is displayed as a comma separate list:
Displaying products with a specific attribute
You can create a table listing products with a specific attribute value only – for example, you can list products with a ‘red’ attribute’.
Filtering by attribute
There are two ways to let customers filter the table to refine the list of products based on their attributes:
- Filter dropdown lists above the table
- Filter widgets in the sidebar
Sorting by attribute
You can sort the table by attribute – either when the table first loads, or by allowing customers to click on the header of an attribute column to sort by that attribute.
Using Attributes as Variations
A product variation consists of one or more attributes, which you use to create the variation.
- A product might have two attributes:
- Color (with the attribute values Red and Blue), and
- Size (with the attribute values Small and Large)
- If you create variations based on all of these attributes, then the product will have the following variations:
- Red Small
- Red Large
- Blue Small
- Blue Large
Once you used your attributes to create variable products, you can either display them as dropdown lists in the add to cart column of the table, or you can list each variation combination on a separate row of the table. Or if you prefer, customers can select variations on the single product page or (if you’re using WooCommerce Product Table with our WooCommerce Quick View Pro plugin) from a quick view lightbox.