Product Attributes overviewEdit on GitHub
A product attribute is a characteristic of a product that consists of a name and value. For example, in the attribute
color = white,
color is the attribute name, and
white is the attribute value.
You can create characteristic attributes for products, like brand or special features. You can define specific values to help you and your customers distinguish between products. You can assign multiple attributes to products to simplify the filter and category functions.
A Back Office user can create product attributes.
Product attribute inheritance
A Back Office user can add product attributes to abstract and concrete products. If they add a product attribute to an abstract product, it is added to all its concrete products. If they add it to a concrete product, it’s not added to the other concrete products.
After declaring an attribute, Back Office users can add it to products, and developers can import products with it.
If a developer imports products with undeclared attributes, Back Office users cannot manage them. We recommend declaring all the attributes you are going to use.
The Spryker Commerce OS product data model allows the creation of multiple product variants. For a shop to distinguish different product variants, some of the variant characteristics must be different. A product attribute that distinguishes one product variant from another is a super attribute.
For a product variant to be selectable on the Storefront, a value of one of its product attributes must be unique compared to the product attribute values of other variants of the same abstract product.
When creating a product attribute, a Back Office user selects if it is a super attribute.
Product variants of the same abstract product can differ by different super attributes. Check the following super attribute examples:
Abstract product X has concrete products A and B:
color = blue
color = green
Abstract product Y has concrete products C and D:
color = red
size = 45
Predefined product attribute values
A predefined product attribute value is a product attribute value that a Back Office user defines when managing product attributes.
A Back Office user can configure a product attribute to accept only predefined values. In this case, when assigning product attributes to products, they choose from the predefined values. Otherwise, they can enter any value for the attribute.
Product attribute translations
A Back Office user can localize product attributes. They can add translations for attribute names and values. For example, in the attribute
Color = White, both
White can be localized.
There are different ways to handle translations of attributes. See the following examples.
Example 1: localized attributes and non-localized values
In a shop with German and English languages, product Y has the
weight attribute name with the
63.5 g value. We want to translate only the attribute name.
We localize the key as follows:
The attribute value
63.5 g is not localized.
As a result, the following is displayed on the Storefront:
- English version of the shop: Weight = 63.5 g
- German version of the shop: Gewicht = 63.5 g
Example 2: localized attributes and values
In a shop with two languages Product X exists with an attribute
Protection Feature and an attribute value
We localize them as follows:
- Attribute key:
- Attribute value:
As a result, the following is displayed on the Storefront:
- English version of the shop: Protection Feature = Waterproof
- German version of the shop: Schutzfunktion = Wasserdicht
Example 3: different localized attributes and values for different languages
Product Z has the
length attribute and is sold in 3 countries: Germany, Ireland, and the US. Since the US does not use the metric system, in the US, we want to display the attribute values in feet. In Germany and Ireland, we want to display the values in meteres.
There are two ways to handle this:
- Add a non-localized attribute key for Germany and Ireland, and a localized key for the US. Two languages can share the same translation for the attribute, like in the Example 1.
- Add localized attribute keys and values for each language.
Non-localized key and localized key for the US
In the DB, the
attribute.length key is saved for non-localized values, and a localized key
attribute.length.us is saved for the translations in the metric system:
We localize two attribute keys:
- Key = attribute.length
- Value (en_IE) = Length
- Value (de_DE) = Länge
- Key = attribute.length.us
- Value (en_US) = Length
For the key
attribute.length the value is
1.5 meter. For the key
attribute.length.us the value is
Localized keys for US, DE and IE
In the DB, the following localized keys are saved:
Key = attribute.length.de
Value (de_DE) = Länge
Key = attribute.length.ie
Value (en_IE) = Length
Key = attribute.length.us
Value (en_US) = Length
Now for each of the attribute keys we add the attribute values.
For the key “attribute.length.de” the value is
For the key “attribute.length.ie” the value is: Value = 1.5 meter
For the key “attribute.length.us” the value is: Value = 4.92 feet
What you see on the Irish and German versions of the shop: Length = 1.5 meter Länge = 1.5 meter
What you see on the US version of the shop: Length = 4.92 feet
Database schema for product attributes
The feature has the following functional constraints which are going to be resolved in the future.
When adding a product variant to an existing abstract product, you can only use the existing super attributes.
To add another super attribute to variants, you need to recreate the abstract product with its concrete products from scratch.
If you import a product without defining its attributes, you cannot edit the attributes in the Back Office.
We recommend defining all the atributes you want to use.
Related Business User documents
|BACK OFFICE USER GUIDES
|Create product attributes
|Edit product attributes
For submitting the form