I am not and have not used the "Generate variation titles based on attribute values" with any "Product variation types." With that fact in mind I am opening a new bug/issue as any other issues involving variation titles appears to be related to using the "Generate variation titles based on attribute values" to generate variation titles.

Problem:
Once a product variation is created and a title set, changing it later does not change what is displayed as the title. I would assume changing a title/text field it would update what is displayed everywhere it gets displayed. But this is not what is happening.

For example:
I am using variations as billing options with 3 different variations. Originally I named/set the titles for these as (Monthly Recurring, Annual Reccuring and One Time) later I changed the name of "Monthly Recurring" to just "Monthly" and then changed "Annual Recurring" to just "Annual".

The title field remains changed after saving the variation if I go to edit again, however what is seen in the list/table of variations for the product under title it has not changed. If I view the product as a user would where the add to cart form has a dropdown select for each variation those titles are still the original titles created when the variation was initially created for the product (Where it should say just "Monthly" or "Annual" it still shows "Monthly Recurring" and "Annual Recurring". I'll attach screen shots showing all that.

If this was just one product I would delete the variations and recreate them but I have this same issue across dozens of products and recreating each variation (even though they are litterally identical for each product and being I can just create variations and then asign them to multiple products (which honestly should be at least an optional way to handle a products variation ....grumble grumble instead of having to create variations for each product that are identical variations on different products, ideally as in for example I decide I want to add an option/variation to 50 existing products it would be easiest to just create a new variation and then assign it either one at a time through product/variation edit at the very least; ideally as a bulk operation) I'm honestly surprised this isn't how things work - but that's beside the issue at hand.

As it currently stands deleting each variation and remaking them is not an ideal situation.

I would also assume seeing the reported issues and patches provided for variation titles when auto generating variation titles is used may actually need this fixed first in order to fix any of those properly.

No errors have been produced and for good messure I'm running Drupal 10.2.3 on Apache/2.4.38 with PHP 8.1.13 and Commerce core 2 version 8.x-2.38

CommentFileSizeAuthor
product-variation-title-no-change.jpg1.04 MBsidgrafix
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sidgrafix created an issue.

sidgrafix’s picture

Nevermind on this, go ahead and close it if you like.. I'm doubtful this is a bug (but could be, I have no idea what the default behavior for this should be - it's not documented)

Finally, I figured out where the actual values come from that appear in the dropdown that is listed as "Title" in a products variation next to SKU in the displayed variations table of a product; pulls from commerce/product-attributes the attribute that was initially created meaning if an attribute is used and selected in the product variation it will use it's value as the title, otherwise it is what is expected and is the title of the variation itself. (so maybe bug or maybe not, default behavior escapes me)

If it is the default behavior I think listing it as "Title" in the "Add variation" edit/tab the way it is, is extremely confusing! I would assume being when a products variation is added "as on creation it has a title field you have to fill out" that would be the "Title" listed next to the "SKU" in the table of variations for a product.

To make such things less confusing I think some kind of helper that can indicate that the title there is not the title created for/in the products variation (as in it will not be the title you will see when you click on edit for a given variation when an attribute is used in the variation) as it is pulled from the "value" selected in the attribute (in my case initially created as a "Product attribute") which was then added as a field to the product variation type. Maybe simply putting titles that are not the variations title in brackets like (Monthly Recurring) with a key above the products variation tabe showing any title in () is the selected attribute value, or something along those lines with perhaps a little documentation explaining why this is like this. (unless this is a bug?)

In general it's confusing enough having to create all the different aspects used in a product (outside of the product) to then use with and in a product, or product group, as well as any corresponding store attributes to then be limited by product variations are per product only. It honestly everything feels like it is all created/setup independently then nested upon nested with this includes that and that includes something else which in turn includes something else just to get it all to work together with very little documentation explaining things.
- sorry, if any of that sounds harsh I apologize (i'm just a bit frustrated, the lack of documentation and explainations for things with commerce core) has me on edge being this is one of the last few things I need to get working properly on a Drupal 10 site replacing a Drupal 7 site..