This article can help you in:
Understanding what is a WooCommerce product attribute and its use.This article can help you in:What is a WooCommerce product attribute?Filter Products by Attributes:Difference between Global Attributes and Custom Product AttributesGlobal Attributes:Custom Product Attributes:How to create attributes?Global AttributesAdd New AttributeAdd New Attribute TermsCustom Product Attributes
Differentiating between Global attribute and Custom Product attribute.
Creating WooCommerce attributes.
- Global attribute
- Custom Product attribute
What is a WooCommerce product attribute?
Attributes are characteristics that define a product. Other than categorizing products, attributes are a simple way to group or filter products. These are useful while filtering or searching a specific product from your shop page for a wide range of products.
By default WooCommerce provides you with a normal sorting menu where you can sort products by price, popularity, latest added, or rating factor. But attributes can be used to differentiate products, by factors like size, color, material, or any other characteristics of the products.
Attributes are often confused with variations. Variations are combinations of 2 or more attributes. So what are attributes?
Let’s consider a shirt as a product; it can be sold in different sizes, colors, materials, patterns, fit, and many other characteristics. Here color, size, material, pattern, and fit are considered Attributes.
In the example above, color can be called an attribute. And Blue, Grey, Violet are Attribute Terms.
Front end view with Attributes(Size & Color) and Terms(S|M|L & Blue|Grey|Violet)
Using attributes to filter products is one of their uses. Here’s how to use the ‘filter products by attributes’ widget.
Filter Products by Attributes:
Adding widgets to your store page gives you the ability to add extra features such as text widgets, design widgets, media widgets, filtering widgets, etc.
Step 1: From the WooCommerce dashboard, navigate to Appearance ➜ Widgets. Here you can add any widget of your choice to offer your customers a better user experience.
Step 2: On your shop page or product page, choose the right space to add the filter menu (sidebar, footer1, footer2).
Step 3: Then, click on the + icon and search for “Filter Products by Attributes”. You can also select the number of attributes you want to list on the filter.
Step 4: Once all changes are done click on the Update button to save the changes. Now the filter will be displayed on your shop page.
Difference between Global Attributes and Custom Product Attributes
Attributes are added when a product is created. There are two different types of attributes; the Global attribute and the Custom Product attribute. These two types of attributes are created in two different ways.
Global attributes are commonly used product attributes, which can be used by several products in your WooCommerce store. These globally created attributes can be applied to new or existing products at any time. In this way, you can use the same attributes for different products without having to create them each time.
Eg: Consider your store is selling shirts, t-shirts, dresses, and hoodies. All these products could have a common attribute, Size. Rather than creating attributes for all 4 products separately, you can create a global attribute and use it for all products.
Custom Product Attributes:
Custom product attributes are used only for specific products. While creating a WooCommerce store, custom product attributes come in handy. A custom product attribute serves the same goal as the global product attribute –it is used to specify a characteristic of a particular product; they are not relevant to all of the products in your store.
A custom product attribute can be created in the product data section when editing or adding a product. To define the features that are exclusive to a specific product, you should make use of the custom product attribute.
Eg: In this case, imagine your store is selling different clothing items like shirts, pants, scarfs, socks, and so on. For some items, the common attributes can be size and color, but in certain cases, you may have to provide the customers with some extra details about the product. That is, you may have to add the material, pattern, and fitting of the item, which may not be the same for every product. In this case, you have to create custom product attributes.
Let’s consider the first item shirts with the following attributes;
- Size- S,M,L
- Color- Red, Blue, Green, Black
- Material- Cotton, Linen, Polyester, Silk
- Fit- Slim fit, Regular fit, Tailored fit
- Size- Free size
- Color- Red, Blue, Black
- Material- Cotton, Linen, Wool
- Length- Above Knee, Ankle length, Insole
- Step 1: Once WooCommerce is installed, navigate to Products ➔ Attributes.
- Step 2: Enter the attribute name and slug. Select a display order for sorting the attribute terms.
- Step 3: Click on the Add Attribute button to save.
- Step 1: Under each attribute created you can find a Configure Term button, click on that. It will move on to the next page where you can add the attribute terms.
- Step 2: Add the Attribute term name, slug, and description(if required).
- Step 3: Click on the Add new (Term) button to save.
- Step 1: Scroll down to the Product Data section and choose the product type Variable Product, from the given dropdown.
- Step 2: Click on the Attributes tab, select the Custom Product Attribute option from the dropdown and click the Add button.
- Step 3: In the ‘Name’ column, enter the Attribute name.
- Step 4: In the Value(s) column enter the Attribute Terms separating them using “|” (vertical bars).
- Step 5: Tick the Used for Variation checkbox to create variations using the added attributes.
- Step 6: To save the attribute click on the Save Attribute button.
And the second item you sell is socks with attributes;
In the above 2 products(shirts & socks), size, color, and material are the common attributes that can be applied to the whole store globally. Whereas ‘fit’ and ‘length’ are product-specific attributes that cannot be used commonly. So these product-specific attributes should be added within that respective product, as a custom product attribute.
How to create attributes?
Adding global attributes to your store is easier than creating custom attributes for each product. With just a few simple steps, you can create attributes that apply to all your store’s products. It’s especially useful if you have multiple products with the same features. Using global swatches can save you a considerable amount of time.
Add New Attribute
Here, you can add the Attribute details.
Note: Each created attribute will be listed on the right side of the page, and can be edited or deleted using the button below each attribute.
Add New Attribute Terms
After you create the attribute, you can add the attribute terms to it.
Note: The created attribute terms will be listed below each respective attribute on the Attributes page.
You can choose the created global attributes from the dropdown menu on the Attributes tab in the Product Data section while creating or editing a product.
Custom Product Attributes
First, you need to select a product for which the custom product attribute will be created.
Note: A collapsing tab will appear where you can add the attribute name and attribute terms separating each using “|” (vertical bar).
Note: Remember these created custom product attributes cannot be accessible for the entire products in your store.
As you read through the article it is clear that creating attributes is simpler than it seems. Other than filtering and grouping, attributes have another main role in forming variation. For a more detailed study refer to the article – How to create variations in WooCommerce.
The post How to set up global attributes and custom product attributes in WooCommerce? appeared first on www.themehigh.com.