Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Right now the variation label is the sku. The sku is not meant to be user friendly, it's a machine name.
A variation is always identified by its attributes. So we should construct a label from that. "Small, Blue"
If there are no attributes, that means there's always only one variation. We can call it "Default".
We have this data on the entity already, so we don't need to store it in a property, we can create it on the fly.
This helps us avoid the problem of the label getting out of date if the attribute gets renamed or gets a new translation.
Comments
Comment #3
bojanz CreditAttribution: bojanz at Centarro commentedDone.