An attribute allows you to define additional data related to the product, such as size, color and so on. It helps in providing more information about the product on the product page of your online store. Also, you can create variable products based on the attributes you define for the product.
There are two types of product attributes in WooCommerce:
- Global attributes: These attributes and its respective terms, can be used by any product on your store. They are created in the Attributes section of WooCommerce settings and hence are defined globally.
- Local attributes: These are custom attributes, and are applied only for a particular product. They are created in the Attributes section of the respective product data meta-box.
Our Product Import Export Plugin for WooCommerce can be used to effortlessly import products with attributes. It imports all the details perfectly into your WooCommerce store. You can also add attributes to an existing product of your store by importing the CSV file and updating the existing product data. It is important that you map the column header of the CSV file correctly with the fields of WooCommerce so that all product attributes can come up without problems.
Note: The CSV Import file must be in UTF-8 format. For more information about UTF-8 encoding, See How to save CSV / Excel File as UTF-8 Encoded?
Now, let us get an understanding of importing a CSV file containing products with attributes.
Before importing the products with attributes, the exported CSV should contain attributes that can be configured in the WooCommerce Product page, as shown in the screenshot below:
Let us say you have a CSV file with a product containing attributes ‘Size’ and ‘Color’. In this file, the global attributes can be identified with the prefix “pa_” before the respective attribute, as shown in the screenshot below:
attribute_data value is displayed in the form of position | visible | variation.
- position: Defines the position of the attribute in the front-end.
- visible: If the attribute is visible at the front-end, the value will be displayed as 1. Else, 0.
- variation: If the attribute is used for variation, the value will be displayed as 1. Else, 0.
Note: Click Sample CSV of Import Attributes to download it.
Following are the steps to import products with attributes:
- Move to Import Products in CSV Format in the Import section of Product settings tab. Further settings appear as shown in the screenshot below.
- You can choose either of the methods for uploading the CSV file. In this article, we are selecting the first method. That is, uploading a CSV file from your computer.
- Click Choose File to browse a required CSV file from your computer.
- Select a mapping file, or click Upload file and import to move ahead and create a new one.
- Enter a mapping filename and map the required WooCommerce Product Fields with column headers of the CSV file. Use Evaluation Field to fix/update the required value for a particular field.
- Click Submit to start importing products into your WooCommerce store.
Based on the CSV file imported, the products and its attributes get added to your store, as shown in the screenshot below:
Once the import is successful, you can view the imported products in the WooCommerce Product page section.
To view its attributes, move to the Attributes section in the respective product page.
The attributes in the product page will be displayed as shown below:
To check Global attributes, you can go to Products > Attributes. You can see the global attribute ‘color’ has been added under this section (see screenshot).
From the above screenshot, we can see the attributes – size and color, have been successfully imported using our plugin.
For more information on importing and exporting of products, read this documentation.