You can create attributes while working on a product or from the Product Attributes page. The following steps show how to create attributes from the Stores menu.
On the Admin sidebar, go to Stores > Attributes > Product.
Click Add New Attribute.
Under Attribute Properties, enter a Default Label to identify the attribute.
To determine the type of input control that is used for data entry, set Input Type to one of the following:
||A single-line input field for text.|
||A multiple-line input field for entering paragraphs of text, such as a product description. You can use the WYSIWYG Editor to format the text with HTML tags, or enter the tags directly into the text.|
||A fully functioning text editor at the attribute location.|
|Date||Displays a date value in the preferred format and time zone. Date values can be selected from a list or a calendar ( ).
Note: Depending on your system configuration, Admin users can enter dates directly into a field or select a date from the calendar or list. For information about specifying date and time values, see Date and Time Custom Options.
||Displays a drop-down list with pre-defined options of
||Displays a drop-down list of values that accepts only a single selection. The Dropdown input type is a key component of configurable products.|
||Displays a drop-down list of values that accepts multiple selections.|
||This input type is used to create price fields that are in addition to the predefined attributes: Price, Special Price, Tier Price, and Cost. The currency used is determined by your system configuration.|
||Associates an extra image with a product, such as a product logo, care instructions, or ingredients from a food label. When you add a media image attribute to the attribute set of a product, it becomes an extra image type, along with Base, Small, and Thumbnail. The media image attribute can be excluded from the storefront media browser.|
||Lets you define FPT rates based on the requirements of your locale.|
||Displays a swatch that depicts the color, texture, or pattern of a configurable product. A visual swatch can be filled with a hexadecimal color value, or display an uploaded image that represents the color, material, texture, or pattern of the option.|
||A text-based representation of a configurable product option that is frequently used for size. Text swatches can also include hexadecimal color values.|
||A fully functioning Page Builder workspace at the attribute location that makes it easy to add engaging content to the product page.|
If you want to require an option selection before the customer can purchase the product, set Values Required to
For Dropdown and Multiple Select input types, do the following:
Under Manage Options, click Add Option.
Enter the first value that you want to appear in the list.
You can enter one value for the Admin, and a translation of the value for each store view. If you have only one store view, you can enter only the Admin value and it is used for the storefront as well.
Click Add Option and repeat the previous step for each option that you want to include in the list.
Select Is Default to use the option as the default value.
Enter a unique Attribute Code in lowercase characters and without spaces.
Set Scope to indicate where in your store hierarchy that the attribute can be used.
If you want to prevent any duplicate value entry, set Unique Value to
To run a validity test of any data entered into a text field, set Input Validation for Store Owner to the type of data that the field should contain.
This field is not available for input types with values that are selected. The test can validate any of the following:
Letters (a-z, A-Z) or Numbers (0-9)
To add this attribute to the Products list, set the following options to
Expand the Manage titles section.
Enter a Title to be used as a label for the field.
If your store is available in different languages, you can enter a translated title for each view.
In the left side panel, choose Storefront Properties.
If the attribute is to be available for search, set Use in Search to
Set the Search Weight value to control where the item appears in search results: 1 (lowest weight) to 10 (highest weight).
Set the Visible in Advanced Search as needed. Learn more in Advanced Search.
To include the attribute in Product Compare, set Comparable on Storefront to
For dropdown, multiple select, and price fields, do the following:
To use the attribute as a filter in layered navigation, set Use in Layered Navigation to
To use the attribute in layered navigation on search results pages, set Use in Search Results Layered Navigation to
For Position, enter a number to indicate the relative position of the attribute in the layered navigation block.
To use the attribute in price rules, set Use for Promo Rule Conditions to
To allow the text to be formatted with HTML, set Allow HTML Tags on Frontend to
This setting makes the WYSIWYG editor available for the field.
To include the attribute on the product page, set Visible on Catalog Pages on Storefront to
Complete the following settings if supported by your theme:
To include the attribute in product listings, set Used in Product Listing to
To use attribute as a sort parameter for product listings, set Used for Sorting in Product Listing to
When complete, click Save Attribute.
For an attribute to be visible on the product creation page, add it to a specific attribute set.
After completing previous steps, go to Stores > Attributes > Attribute Set.
Select the attribute set you need in the list, and open it in edit mode.
Drag the created attribute from the Unassigned Attributes list to the appropriate folder in the Groups column.
When complete, click Save.
Any attribute that is used as a drop-down list of options for a configurable product must have the following properties:
|Catalog Input Type for Store Owner||Dropdown|
When an attribute is deleted, it is removed from any related products and attribute sets. System attributes are part of the core functionality of your store and cannot be deleted.
Before deleting an attribute, make sure that it is not currently used by any product in your catalog. An easy way to determine if an attribute is in use is to use the Export tool to check the list of product Entity Attributes. If the attribute is not included in the list, then it is not used by any products in the catalog.
To delete an attribute:
On the Admin sidebar, go to Stores > Attributes > Product.
Find the attribute in the list, and open in edit mode.
Click Delete Attribute.
When prompted to confirm, click OK.