Create and delete product attributes

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.

Step 1: Describe the basic attribute properties

  1. On the Admin sidebar, go to Stores > Attributes > Product.

  2. Click Add New Attribute.

    New Attribute Properties {width="600" modal="regular"}

  3. For Default Label, enter a label that identifies the attribute.

  4. Set Catalog Input Type for Store Owner to the type of input control to be used for data entry.

    If the attribute is used for a configurable product, choose Dropdown. Then, set Required to Yes.

  5. If you want to require an option selection before the customer can purchase the product, set Values Required to Yes.

  6. 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.

    Product attribute - manage options {width="600" modal="regular"}

Step 2: Describe the advanced properties (if needed)

  1. Enter a unique Attribute Code in lowercase characters and without spaces.

    note
    NOTE
    It is not recommended to use the type value in the Attribute Code field. This can cause errors because the type value is reserved for system use.

    Product attribute - advanced properties {width="600" modal="regular"}

    The available options depend on the Catalog Input Type for Store Owner setting.

  2. To indicate where in your store hierarchy the attribute can be used, set Scope.

  3. If you want to prevent any duplicate value entry, set Unique Value to Yes.

  4. For input types that are entered values, run a validity test of any data entered into a text field by setting 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:

    • Decimal Number
    • Integer Number
    • Email
    • URL
    • Letters
    • Letters (a-z, A-Z) or Numbers (0-9)

    Input validation {width="400"}

  5. To add this attribute to the Products list, set the following options to Yes.

    • Add to Column Options - Includes the attribute as a column in the Products list.
    • Use in Filter Options - Adds a filter control to the column header in the Products list.

Step 3: Enter the field label

  1. In the left side navigation, choose Manage Labels.

  2. 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.

    Product attribute - manage titles {width="600" modal="regular"}

    note
    NOTE
    If you plan to use this attribute as a facet in Live Search, you must specify a store-specific label. Without it, the attribute name may not display correctly on the facet configuration page. To update the configuration, manually edit the label using the edit option in the Live Search faceting list in the Live Search Guide.

Step 4: Describe the storefront properties

  1. In the left side navigation, choose Storefront Properties.

    Product attributes - storefront properties {width="600" modal="regular"}

    The available options depend on the Catalog Input Type for Store Owner setting.

  2. If the attribute is to be available for search, set Use in Search to Yes.

    • To control where the item appears in search results, set the Search Weight value: 1 (lowest weight) to 10 (highest weight).

    • Set the Visible in Advanced Search as needed. Learn more in Advanced Search.

  3. To include the attribute in Product Compare, set Comparable on Storefront to Yes.

  4. 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 Yes.

    • To use the attribute in layered navigation on search results pages, set Use in Search Results Layered Navigation to Yes.

    • For Position, enter a number to indicate the relative position of the attribute in the layered navigation block.

  5. To use the attribute in price rules, set Use for Promo Rule Conditions to Yes.

  6. To allow the text to be formatted with HTML, set Allow HTML Tags on Frontend to Yes.

    This setting makes the WYSIWYG editor available for the field.

  7. To include the attribute on the product page, set Visible on Catalog Pages on Storefront to Yes.

  8. Complete the following settings if supported by your theme:

    • To include the attribute in product listings, set Used in Product Listing to Yes.

    • To use the attribute as a sort parameter for product listings, set Used for Sorting in Product Listing to Yes.

  9. When complete, click Save Attribute.

Step 5: Assign the created attribute to the attribute set

For an attribute to be visible on the product creation page, add it to a specific attribute set.

  1. After completing previous steps, go to Stores > Attributes > Attribute Set.

  2. Select the attribute set you need in the list, and open it in edit mode.

  3. Drag the created attribute from the Unassigned Attributes list to the appropriate folder in the Groups column.

  4. When complete, click Save.

Attributes for configurable products

Any attribute that is used as a drop-down list of options for a configurable product must have the following properties:

Property
Value
Catalog Input Type for Store Owner
Dropdown
Scope
Global

Delete an attribute

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 no product in your catalog currently uses it. 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 list does not include the attribute, then no products in the catalog use it.

To delete an attribute:

  1. On the Admin sidebar, go to Stores > Attributes > Product.

  2. Find the attribute in the list, and open in edit mode.

  3. Click Delete Attribute.

    Delete attribute {width="600" modal="regular"}

  4. When prompted to confirm, click OK.

recommendation-more-help
commerce-admin-help-catalog