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.
Like for the node entity it would be great to have a field to edit the name/label of the product title field.
Comment | File | Size | Author |
---|---|---|---|
#3 | product2.jpg | 647.45 KB | klagler |
Comments
Comment #2
vasike1. @klagler : i think you meant Variations and not Products
2. This is already there, but you need to change a setting about this.
Generate variation titles based on attribute values.
for ex. on default type : admin/commerce/config/product-variation-types/default/edit
3. Maybe this needs to be documented : http://docs.drupalcommerce.org/v2/product/products.html
Comment #3
klagler CreditAttribution: klagler commentedNo, I mean only the label for the title field. For example to have it say "Product name" instead of title.
I know this is just a very minor issue, this label could also be altered programmatically, and there are more important things to do to get commerce ready but I think this would be good to have in a final version of commerce.
Comment #4
vasikegot it. "retitled back"
There is a new PR about this.
https://github.com/drupalcommerce/commerce/pull/656
It seems there is also description defined for the product Title base field.
So i also included the description for this setting.
Product Type Test updated.
Comment #5
bojanz CreditAttribution: bojanz commentedI don't see a need to pollute the UI with a setting that won't be used by most sites.
Such settings are better served by code based alters, in this case hook_entity_base_field_info_alter().
We should add an entry to our Recipes section of the docs with an example:
Comment #6
shabana.navas CreditAttribution: shabana.navas at Acro Commerce commentedAdded documentation to recipes section and created PR: https://github.com/drupalcommerce/commerce-docs/pull/73.
Comment #7
mglamanMerged into docs, thanks!
Comment #9
jeffamhook_entity_base_field_info_alter() as mentioned in #5 didn't work for me, although I have my hooks in a custom install profiles `.profile` rather than a custom module.
What did work, in case this helps anyone else, was the following, adapted from https://drupal.stackexchange.com/a/253282