Product types are used to describe characteristics and custom attributes of your products. Managing Product Types in the Merchant Center helps you to get an overview of all exisiting Product Types within your project as well as a possibility to update or delete them from here or to create a new one.
You can manage your product types in the Product Types view available under Settings in the left navigation bar. The view allows you to create, edit, and delete product types as well as create, edit, and delete attributes for each product type. Attributes are the characteristics a product can have, such as color, size, quantity, or any other specification needed.
The Product Types view lists all product types defined in your project. The list can be sorted alphabetically, by creation date and by the date of the last modification.
Create a product type
To create a new product type click Add Product Type. You have to give it a name and a description. You can also add a key as identifier. The key is optional, but if set it has to be unique. If the given key exists already an error message is shown.
Once the name and the description are filled out, the product type can be saved.
Edit a product type
The product type name, description, and key can be edited and updated at any time. In addition you can add new attributes to a product type, and edit or delete existing attributes.
Add attributes to a product type
After a product type has been saved for the first time, you can add attributes into the product type by clicking on Add attribute.
A new overlay screen opens where you can specify all the details of the new attribute.
Attribute identifier (name):
This field is used to identify the attribute on a given product type. It must be filled out and unique for each attribute within each product type. Two attributes can share the same identifier across different product types only if they are of the same attribute type and has the same constraints.
This is the mandatory field that will help you find the right attribute when creating or editing your products. The value added here will be displayed as label in the product details view. The value can be localised if your project has multiple language locales set.
This field allows you to add a short info text to describe the attribute. The value defined here is displayed below the label of the attributes in the product details view. The value can be localised if your project has multiple locales set.
This setting allows you to restrict how values can be set for the different variants of a given product. You can choose among the following constraints:
- None: the attribute has no constraints and can be filled out individually per variant.
- Unique: the value must be different for each variant of a given product.
- Same for all: the value is defined on product level and is identical for all variants of that product.
- Combination unique: the combination of values of all attributes of a given product with this constraint must be different for each variant.
The type determines what kind of value an attribute can be filled out with. You can choose among the following types:
- Yes/No (boolean): allows to select between Yes and No (or leave empty is it is not set as required). A boolean attribute could be, for example, whether the product is child-friendly, or not.
- Text: allows to enter a string or text as value. For multi-language projects the value can be localised. For long values, you can choose to use a multiple line field for that attribute. You can find this option in the Attribute settings section right below. A good example of a text attribute could be the author (in case the product is a book).
- Number: allows to add a numeric value, for example, the weight of the product.
- Money: allows to set a currency and add a numeric value (in cents). The value of a stamp (as a product) could be displayed with this type of attribute.
- Date/time: allows to set a date, time or date + time in ISO 8601 format. For example, products related to events could use this attribute type to display their set times.
- List (enum): allows to select from predefined values. These values can be set in the table below (see screenshot) by providing a unique enumeration key and a list item label, which will be the visible and selectable option in the dropdown menu. Both, key and label, are optional but at least one needs to be present to be able to save the changes. A list attribute could be, for example, the different colors that a product can be.
- Reference: allows referencing to another resource by ID. The available resources are: category, channel, key-value-document, product type, product, review, shipping-method, state and zone.
Besides type-specific settings named in the attribute types above, you can set the following general settings on any attribute:
- Searchable: when this option is selected, the attribute is included in the shop frontend search (product projection search) and is affecting the search results.
- Required: when this option is selected, the attribute is mandatory and must be filled on all products/variants assigned to this product type.
- Sets: when this option is selected, the attribute can contain multiple values.
Please note that sets cannot be required. If you select one of those options, the other one will become unavailable.
Save an attribute
Once the mandatory fields are filled out, the attribute definition can be added to the product type by clicking on Add attribute. By doing so the attribute definition will show up in the New or modified attributes table with the label new on it. To fully save your changes, you need to save the product type (see the “Save a product type” section below).
Edit an attribute definition
New attributes can be fully edited, while previously saved attributes have some limitations:
- The label, description and the searchable setting are editable.
- In attribute definitions of type List (enum), enum values can be added, edited and deleted in the table that contains all those values. To be able to edit them, you need to click the pencil icon located on top right corner of the table. That table can be sorted only before entering to the edit mode.
When saving your changes, the modified attribute definition will be added to the New or modified attributes table with the label modified on it (only for those previously saved). Here again, you have to save the product type to make your changes permanent (see the section “Save a product type” below).
Delete an attribute
An attribute can be deleted either…
- by clicking on the trash icon in the Attributes table of a given product type, or
- by clicking on the trash icon in the top right corner of the attribute definition detail view.
New attributes that are not saved yet can be discarded by clicking on the respective link in New or modified attributes. The attribute will be removed instantly without having to save the product type or confirm the deletion.
In case the attribute definition was previously saved, clicking on the trashcan icon won’t delete it instantly. The attribute will be added to the New or modified attributes table with a delete label on it. Save the product type to permanently delete the attribute definition (see the section “Save a product type” below). Once the product type is saved, the data of deleted attributes cannot be recovered.
Save a product type
Once you are done with all the changes to the attribute definitions and to save all changes on a product type (for example, new, modified, or deleted attributes), you need to click Save in the bottom bar.
If this product type has previously saved attributes, you’ll see two different tables in the product type overview page: one for new or edited attributes and another table for previously saved attributes. The attributes on the first table will merge with the attributes in the second table once you save the product type.
You’ll get a notification if the product type has been saved successfully. If saving the product type fails due to a validation error in an attribute, you’ll be redirected to the respective attribute definition detail view to correct the error.