Important
You are browsing documentation for version 5.0 of OroCommerce, supported until January 2025. Read the documentation for version 6.0 (the latest LTS version) to get up-to-date information.
See our Release Process documentation for more information on the currently supported and upcoming releases.
Manage Product Attributes in the Back-Office
Overview
Hint
This section is part of the Product Management topic that provides a general understanding of the product concept in OroCommerce.
A Product Attribute is a type of a custom field in the product details. For product attributes, OroCommerce enables you to manage and group attributes that are unique to a particular product family. By adding the product attributes only to the product families they fit, you can limit the product data to the necessary characteristics.
For example, when your OroCommerce store sells TVs and T-shirts, these items share some generic attributes (e.g., name, vendor), and differ in the remaining attributes set. For example, there might be a Screen properties group containing resolution, diagonal, and matrix that should be linked to the products in the TV product family. For the T-shirts family, the linked attribute group may have color, size, material, fit, and care guidance (washing, ironing, dry cleaning, etc.).
Note
You can manage product attributes per organization. Any changes made to product attributes within one organization do not affect the attributes of others. You can use the attributes created in the global organization in other organizations, but only a system administrator of the global organization can edit them.
By default, OroCommerce comes with the following system product attributes:
Add new product attributes to introduce new custom parameters in your product details. Include product attributes in one or multiple product families into the new or existing attribute group.
Note
System attributes are shared among all product families. You can reorganize the way system attributes are grouped, but you cannot remove a product attribute from the product family.
Hint
Instead of using one general-purpose attribute (e.g., color), create multiple specific attributes (e.g., car_color, laptop_color, table_color). This prevents loading all attributes as filters on all product pages and as a result, reduces the load on the database and improves the overall application performance.
Create a Product Attribute
See a short demo on how to create product attributes, or keep reading the step-by-step guidance below.
The creation of an attribute happens in two steps:
In step 1, specify basic properties, such as the attribute name and type.
In step 2, you specify more advanced properties, some of which may depend on the selected attribute type.
Step 1: Select Attribute Type
To create an attribute:
Navigate to Products > Product Attributes using the main menu.
Click Create Attribute.
Hint
You may receive the following warning message, which notifies you about the limits for the number of attributes that can be created, which can affect the future export of entities.
The number of attributes stored as columns in the X table (the attributes that are relations or that have ever been marked as “A”, “B”, “C”) is approaching the limit after which it will no longer be possible to export Y with the standard X export. Remaining number of attributes - approximately Z. |
Once 90% of the limit is reached, you will receive a flash message with the related warning.
Reaching 100% of the limit triggers a warning message on a potential inactive export when clicking the Export button.
Complete the following fields:
Field Name |
Fill in the field name that should be used to store the values of the product attribute. It should be between 2 and 22 characters long. Use only alphabetic symbols, underscore, and numbers. |
Type |
Select an attribute type to store the value of the specific data type. For the list of available field types and their purposes, refer to the relevant section of the Entity Field Properties topic or see descriptions in Step 2 below. Select one of the Relations for the attribute to connect your custom entities as product information (these can be used for business intelligence and segments):
|
Click Continue to load the next page.
Step 2: Provide Type-Based Details
Proceed to create the attribute as described below.
Fill in remaining general information:
Label — Enter the attribute label. It will be displayed both in the back-office and in the storefront.
Description — When filled in, the description will be used as a field tooltip when the attribute appears on the forms.
Provide additional information for product attributes depending on their type. Not all attribute types have additional fields, as reflected in the table:
BigInt |
— |
Boolean |
— |
Date |
— |
DateTime |
— |
Decimal |
|
File |
|
Image |
|
Integer |
— |
Money |
— |
Select and Multi-Select |
Perform the following actions: |
Multiple Files |
|
Multiple Images |
|
Percent |
— |
String |
|
Text |
— |
WYSIWYG |
|
Relations:
|
|
In the Frontend options section, set up the storefront options applicable to the product attribute.
Important
Please note that if the option is not applicable to attributes of the selected type (e.g., image, text, multi-select, etc.), it does not appear in this section.
Show On View |
Defines whether the attribute is visible or hidden in the storefront. |
Show On Form |
Defines whether the attribute is enabled in the storefront forms. |
Exportable |
If enabled, the attribute content is to be displayed in the product data export file in the storefront. |
Searchable |
If enabled, the attribute content can be found in the storefront via search. |
Filterable |
Defines whether a dedicated filter is available for the attribute in the storefront. |
Filter By |
Defines the type of filtering to be applied to the attribute:
|
Sortable |
Defines whether sorting is available for the attribute in the storefront. Note Please note that the sortable option is not applicable for the multi-select attribute type. Make sure to set the option to ‘0’ or ‘No’ when using the importing strategy. |
Global Search Boost |
Available for the OroCommerce Enterprise edition if Elasticsearch is used as the search engine. This option enables you to boost the value of the field during search. By default, the boost for sku is set to 5, for names to 3, meaning that the searchable word is first searched among SKUs, then names, etc. The option works for searchable attributes only. |
In the Backoffice options section, fill in the Import & Export subsection to configure details of the product attribute’s import/export:
Column Name |
Enter the name of the column (in a CSV file) that would represent the attribute you are creating. If left blank, a label will be used. |
Column Position |
Type a number that corresponds to the position of the attribute in a CSV file. |
Use As Identity |
Specify whether this column should be used as an identifier of the entity record. Select No, Only when not empty, or Always. If set to Only when not empty, the field may be omitted in the identity when it has no value. |
Exclude Column |
Select No, if you want this field available for export, or Yes if you wish to exclude the column. |
Export Fields |
If the attribute is of the relation type, this option defines which fields of the related entity record to export:
|
In the Backoffice options section, fill in the Other subsection, specifying the configuration options for the product attribute view, search and use in the back-office and storefront.
Note
Please note that available options depend on the type selected for the attribute (e.g., image, text, multi-select, etc.).
Once all options are configured, and the necessary information is provided, click Save.
If the created attribute is of a table column storage type, click Update Schema to reindex the data for search and filter.
Note
The product attribute storage type is set to table column for the attribute with Select of Multi-Select data type, and also for the attribute of any type with Filterable or Sortable option enabled. If this step is omitted, the newly created attribute will not appear in the select attribute options in other areas of OroCommerce (e.g., product families configuration).
You can check an attribute’s storage type on the page with the attributes list:
Warning
Schema changes are permanent and cannot be easily rolled back. We recommend that developers back up data before any database schema change if changes have to be rolled back.
Import Product Attributes
Import File option helps import a large bulk of product attributes information into the product attributes list using the .csv file.
Example of product attributes bulk import template
fieldName |
type |
entity.label |
entity.description |
entity.contact_information |
form.is_enabled |
importexport.header |
importexport.order |
importexport.identity |
attachment.mimetypes |
---|---|---|---|---|---|---|---|---|---|
field_money |
money |
label_value |
description_value |
marketinglist.entity_config. |
yes |
header_value |
12 |
no |
mimetypes_value |
Note
Keep in mind that multi-select attribute type doesn’t support the sorting option, so make sure to set this option to “0” or “No” when preparing the corresponding file for importing.
To import a bulk of product attributes:
In the main menu, navigate to Products > Product Attributes.
Click Import File on the top right.
Hint
You may receive the following warning message which notifies you about the limits for the number of attributes that can be imported, which can effect the future export of entities.
The number of attributes stored as columns in the X table (the attributes that are relations or that have ever been marked as “A”, “B”, “C”) is approaching the limit after which it will no longer be possible to export Y with the standard X export. Remaining number of attributes - approximately Z. |
Pay attention that the maximum number of columns in the row must fit in a single 8192-byte heap page. For example, if all the columns are simple fields, such as integer values, then the quantity of columns can reach 1,600. The number of fields or attributes in the exporting entity must be within the bespoke limit; otherwise, this may impose a restriction on export functionality.
Once 90% of the limit is reached, you will receive a flash message with the related warning.
Reaching 100% of the limit triggers a warning message on a potential inactive export when clicking the Export button.
Prepare data for import: Create your bulk information in the .csv format. Once your file is ready, click Choose File, select the prepared comma-separated values (.csv) file, and click Import File.
Note
Ensure that your .csv file is saved in the Unicode (UTF-8) encoding. Otherwise, the content of the file can be rendered improperly.
Validate import results: Click Validate to check your import results. If there are any Records with errors, fix them in the .csv file before starting the import.
Launch import: After successful validation, click Import File.
Click Cancel to decline the import.
Important
Interactive status messages inform about the import progress, and once the import is complete, the changes are reflected in the list upon refresh. Additionally, an email message with the import status is delivered to your mailbox.
Follow the on-screen guidance for any additional actions. For example, for the inventory template, select one of the options: a) inventory statuses only or b) detailed inventory levels.
Related Topics