Issue
When creating a product specification, a key is defined under Product Management > Specifications. However, after adding this specification to a product, the Product Specification widget on the product page displays a different key (usually a number) instead of the originally defined one. The user must then manually update the key for each product.
Why does the specification key need to be updated manually on each product instead of inheriting the key from the created specification?
Environment
- Liferay DXP 2025.Q1
- Commerce
Resolution
This behavior is expected due to the design of the Product Specifications feature. The distinction is between a Specification Label and a Specification Value:
- Specification Label: The entry created under Product Management > Specifications acts as a template or a label. Its purpose is to be a reusable definition for a type of specification (e.g., "Color", "Weight").
- Specification Value: When you add this specification label to a product, you are prompted to provide the actual value for that specific product. This value is a separate entity from the label.
The Product Specification widget is designed to display the key of the Specification Value, not the key of the Specification Label. The system automatically generates a unique numeric key for the value upon creation. The intention is that while the label is a template, the specific value and its key can be customized for each product.
The Liferay Product Team is aware that this design can be ambiguous and is exploring ways to improve the user experience in future releases.
Additional Information